public class MortalCacheValue extends ImmortalCacheValue
MortalCacheEntry| Modifier and Type | Class and Description |
|---|---|
static class |
MortalCacheValue.Externalizer |
| Modifier and Type | Field and Description |
|---|---|
protected long |
created |
protected long |
lifespan |
value| Constructor and Description |
|---|
MortalCacheValue(Object value,
long created,
long lifespan) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canExpire() |
MortalCacheValue |
clone() |
boolean |
equals(Object o) |
long |
getCreated() |
long |
getLifespan() |
int |
hashCode() |
boolean |
isExpired() |
boolean |
isExpired(long now) |
void |
setCreated(long created) |
void |
setLifespan(long lifespan) |
InternalCacheEntry |
toInternalCacheEntry(Object key) |
String |
toString() |
getLastUsed, getMaxIdle, getValue, setValuepublic MortalCacheValue(Object value, long created, long lifespan)
public final long getCreated()
getCreated in interface InternalCacheValuegetCreated in class ImmortalCacheValuepublic final void setCreated(long created)
public final long getLifespan()
getLifespan in interface InternalCacheValuegetLifespan in class ImmortalCacheValuepublic final void setLifespan(long lifespan)
public boolean isExpired(long now)
isExpired in interface InternalCacheValueisExpired in class ImmortalCacheValuenow - the current time as expressed by System.currentTimeMillis()public boolean isExpired()
isExpired in interface InternalCacheValueisExpired in class ImmortalCacheValuepublic final boolean canExpire()
canExpire in interface InternalCacheValuecanExpire in class ImmortalCacheValuepublic InternalCacheEntry toInternalCacheEntry(Object key)
toInternalCacheEntry in interface InternalCacheValuetoInternalCacheEntry in class ImmortalCacheValuepublic boolean equals(Object o)
equals in class ImmortalCacheValuepublic int hashCode()
hashCode in class ImmortalCacheValuepublic String toString()
toString in class ImmortalCacheValuepublic MortalCacheValue clone()
clone in class ImmortalCacheValueCopyright © 2012 JBoss by Red Hat. All Rights Reserved.