|
||||||||||
| 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.TransientMortalCacheEntry
public class TransientMortalCacheEntry
A cache entry that is both transient and mortal.
| Nested Class Summary | |
|---|---|
static class |
TransientMortalCacheEntry.Externalizer
|
| Constructor Summary | |
|---|---|
TransientMortalCacheEntry(Object key,
Object value,
long maxIdle,
long lifespan,
long lastUsed,
long created)
|
|
| Method Summary | |
|---|---|
boolean |
canExpire()
|
TransientMortalCacheEntry |
clone()
|
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 |
getLastUsed()
|
long |
getLifespan()
|
long |
getMaxIdle()
|
Object |
getValue()
Retrieves the value of this entry |
int |
hashCode()
|
boolean |
isExpired()
|
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. |
Object |
setValue(Object value)
Sets the value of the entry, returing the previous value |
InternalCacheValue |
toInternalCacheValue()
Creates a representation of this entry as an InternalCacheValue. |
String |
toString()
|
void |
touch()
Updates access timestamps on this instance |
| Methods inherited from class org.infinispan.container.entries.AbstractInternalCacheEntry |
|---|
commit, getKey, isChanged, isCreated, isLockPlaceholder, isNull, isRemoved, isValid, rollback, setCreated, setRemoved, setValid |
| Methods inherited from class java.lang.Object |
|---|
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 void setLifespan(long lifespan)
InternalCacheEntry
setLifespan in interface CacheEntrysetLifespan in interface InternalCacheEntrysetLifespan in class AbstractInternalCacheEntrylifespan - lifespan to setpublic void setMaxIdle(long maxIdle)
InternalCacheEntry
setMaxIdle in interface CacheEntrysetMaxIdle in interface InternalCacheEntrysetMaxIdle in class AbstractInternalCacheEntrymaxIdle - maxIdle to setpublic Object getValue()
CacheEntry
public long getLifespan()
public final boolean canExpire()
public long getCreated()
public boolean isExpired()
public final long getExpiryTime()
InternalCacheEntry
public InternalCacheValue toInternalCacheValue()
InternalCacheEntryInternalCacheValue. 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.
public long getLastUsed()
public final void touch()
InternalCacheEntry
public final void reincarnate()
InternalCacheEntry
public long getMaxIdle()
public Object setValue(Object value)
CacheEntry
value - value to set
public boolean equals(Object o)
equals in interface Map.Entry<Object,Object>equals in class Objectpublic int hashCode()
hashCode in interface Map.Entry<Object,Object>hashCode in class Objectpublic TransientMortalCacheEntry clone()
clone in interface InternalCacheEntryclone in class AbstractInternalCacheEntrypublic String toString()
toString in class AbstractInternalCacheEntry
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||