|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.infinispan.container.entries.AbstractInternalCacheEntry
org.infinispan.container.entries.TransientCacheEntry
org.infinispan.container.entries.TransientMortalCacheEntry
public class TransientMortalCacheEntry
A cache entry that is both transient and mortal.
Constructor Summary | |
---|---|
TransientMortalCacheEntry(Object key,
Object value,
long maxIdle,
long lifespan,
long lastUsed,
long created)
|
Method Summary | |
---|---|
boolean |
equals(Object o)
|
long |
getCreated()
|
long |
getExpiryTime()
Only used with entries that have a lifespan, this determines when an entry is due to expire. |
long |
getLifespan()
|
int |
hashCode()
|
boolean |
isExpired()
|
InternalCacheEntry |
setLifespan(long lifespan)
Sets the lifespan of the entry. |
InternalCacheEntry |
setMaxIdle(long maxIdle)
Sets the maximum idle time of the entry. |
InternalCacheValue |
toInternalCacheValue()
Creates a representation of this entry as an InternalCacheValue . |
Methods inherited from class org.infinispan.container.entries.TransientCacheEntry |
---|
canExpire, getLastUsed, getMaxIdle, touch |
Methods inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry |
---|
commit, getKey, getValue, isChanged, isCreated, isNull, isRemoved, isValid, rollback, setCreated, setRemoved, setValid, setValue, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TransientMortalCacheEntry(Object key, Object value, long maxIdle, long lifespan, long lastUsed, long created)
Method Detail |
---|
public InternalCacheEntry setLifespan(long lifespan)
CacheEntry
setLifespan
in interface CacheEntry
setLifespan
in interface InternalCacheEntry
setLifespan
in class TransientCacheEntry
lifespan
- lifespan to set
public InternalCacheEntry setMaxIdle(long maxIdle)
CacheEntry
setMaxIdle
in interface CacheEntry
setMaxIdle
in interface InternalCacheEntry
setMaxIdle
in class TransientCacheEntry
maxIdle
- maxIdle to set
public long getLifespan()
getLifespan
in interface CacheEntry
getLifespan
in class TransientCacheEntry
public long getCreated()
getCreated
in interface InternalCacheEntry
getCreated
in class TransientCacheEntry
public boolean isExpired()
isExpired
in interface InternalCacheEntry
isExpired
in class TransientCacheEntry
public final long getExpiryTime()
InternalCacheEntry
getExpiryTime
in interface InternalCacheEntry
getExpiryTime
in class TransientCacheEntry
public InternalCacheValue toInternalCacheValue()
InternalCacheEntry
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.
toInternalCacheValue
in interface InternalCacheEntry
toInternalCacheValue
in class TransientCacheEntry
public boolean equals(Object o)
equals
in class TransientCacheEntry
public int hashCode()
hashCode
in class TransientCacheEntry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |