public class RedisCacheElement extends SimpleValueWrapper
RedisCache
.Constructor and Description |
---|
RedisCacheElement(RedisCacheKey cacheKey,
Object value) |
Modifier and Type | Method and Description |
---|---|
RedisCacheElement |
expireAfter(long seconds)
Expire the element after given seconds.
|
RedisCacheKey |
getKey() |
byte[] |
getKeyBytes()
Get the binary key representation.
|
long |
getTimeToLive() |
boolean |
hasKeyPrefix() |
boolean |
isEternal() |
void |
setTimeToLive(long timeToLive)
Set the elements time to live.
|
get
public RedisCacheElement(RedisCacheKey cacheKey, Object value)
cacheKey
- the key to be used for storing value in RedisCache
. Must not be null.value
- public byte[] getKeyBytes()
public RedisCacheKey getKey()
public void setTimeToLive(long timeToLive)
timeToLive
- public long getTimeToLive()
public boolean hasKeyPrefix()
RedisCacheKey
is prefixed.public boolean isEternal()
public RedisCacheElement expireAfter(long seconds)
seconds
- Copyright © 2011-2016–2016 Pivotal Software, Inc.. All rights reserved.