|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface InternalCacheEntry
Interface for internal cache entries that expose whether an entry has expired.
Method Summary | |
---|---|
boolean |
canExpire()
|
InternalCacheEntry |
clone()
|
long |
getCreated()
|
long |
getExpiryTime()
Only used with entries that have a lifespan, this determines when an entry is due to expire. |
long |
getLastUsed()
|
boolean |
isExpired()
|
boolean |
isExpired(long now)
|
void |
reincarnate()
"Reincarnates" an entry. |
void |
setLifespan(long lifespan)
Sets the lifespan of the entry. |
void |
setMaxIdle(long maxIdle)
Sets the maximum idle time of the entry. |
InternalCacheValue |
toInternalCacheValue()
Creates a representation of this entry as an InternalCacheValue . |
void |
touch()
Updates access timestamps on this instance |
void |
touch(long currentTimeMillis)
Updates access timestamps on this instance to a specified time |
Methods inherited from interface org.infinispan.container.entries.CacheEntry |
---|
commit, getKey, getLifespan, getMaxIdle, getValue, isChanged, isCreated, isEvicted, isLockPlaceholder, isNull, isRemoved, isValid, rollback, setCreated, setEvicted, setRemoved, setValid, setValue, undelete |
Methods inherited from interface java.util.Map.Entry |
---|
equals, hashCode |
Methods inherited from interface org.infinispan.container.entries.versioned.Versioned |
---|
getVersion, setVersion |
Method Detail |
---|
boolean isExpired(long now)
the
- current time as defined by System.currentTimeMillis()
boolean isExpired()
boolean canExpire()
void setMaxIdle(long maxIdle)
setMaxIdle
in interface CacheEntry
maxIdle
- maxIdle to setvoid setLifespan(long lifespan)
setLifespan
in interface CacheEntry
lifespan
- lifespan to setlong getCreated()
long getLastUsed()
long getExpiryTime()
void touch()
void touch(long currentTimeMillis)
currentTimeMillis
- void reincarnate()
InternalCacheValue toInternalCacheValue()
InternalCacheValue
. The main
purpose of this is to provide a representation that does not have a reference to the key. This is useful in
situations where the key is already known or stored elsewhere, making serialization and deserialization more
efficient.
Note that this should not be used to optimize memory overhead, since the saving of an additional reference to a
key (a single object reference) does not warrant the cost of constructing an InternalCacheValue. This only
makes sense when marshalling is involved, since the cost of marshalling the key again can be sidestepped using an
InternalCacheValue if the key is already known/marshalled.
InternalCacheEntry clone()
|
--> | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |