public class RedisCacheKey extends Object
Constructor and Description |
---|
RedisCacheKey(Object keyElement) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getKeyBytes()
Get the
Byte representation of the given key element using prefix if available. |
Object |
getKeyElement() |
boolean |
hasPrefix() |
void |
setSerializer(RedisSerializer<?> serializer)
Set the
RedisSerializer used for converting the key into its Byte representation. |
RedisCacheKey |
usePrefix(byte[] prefix)
Use the given prefix when generating key.
|
RedisCacheKey |
withKeySerializer(RedisSerializer serializer)
Use
RedisSerializer for converting the key into its Byte representation. |
public RedisCacheKey(Object keyElement)
keyElement
- must not be null.public byte[] getKeyBytes()
Byte
representation of the given key element using prefix if available.public Object getKeyElement()
public void setSerializer(RedisSerializer<?> serializer)
RedisSerializer
used for converting the key into its Byte
representation.serializer
- can be null.public boolean hasPrefix()
public RedisCacheKey usePrefix(byte[] prefix)
prefix
- can be null.public RedisCacheKey withKeySerializer(RedisSerializer serializer)
RedisSerializer
for converting the key into its Byte
representation.serializer
- can be null.Copyright © 2011–2017 Pivotal Software, Inc.. All rights reserved.