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 |
getExpiryTime() |
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, getMetadata, getValue, setValue
public MortalCacheValue(Object value, long created, long lifespan)
public final long getCreated()
getCreated
in interface InternalCacheValue
getCreated
in class ImmortalCacheValue
public final void setCreated(long created)
public final long getLifespan()
getLifespan
in interface InternalCacheValue
getLifespan
in class ImmortalCacheValue
public final void setLifespan(long lifespan)
public boolean isExpired(long now)
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
now
- the current time as expressed by System.currentTimeMillis()
public boolean isExpired()
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
public final boolean canExpire()
canExpire
in interface InternalCacheValue
canExpire
in class ImmortalCacheValue
public InternalCacheEntry toInternalCacheEntry(Object key)
toInternalCacheEntry
in interface InternalCacheValue
toInternalCacheEntry
in class ImmortalCacheValue
public long getExpiryTime()
getExpiryTime
in interface InternalCacheValue
getExpiryTime
in class ImmortalCacheValue
public boolean equals(Object o)
equals
in class ImmortalCacheValue
public int hashCode()
hashCode
in class ImmortalCacheValue
public String toString()
toString
in class ImmortalCacheValue
public MortalCacheValue clone()
clone
in class ImmortalCacheValue
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.