public class TransientMortalCacheValue extends MortalCacheValue
TransientMortalCacheEntry
Modifier and Type | Class and Description |
---|---|
static class |
TransientMortalCacheValue.Externalizer |
Modifier and Type | Field and Description |
---|---|
protected long |
lastUsed |
protected long |
maxIdle |
created, lifespan
value
Constructor and Description |
---|
TransientMortalCacheValue(Object value,
long created,
long lifespan,
long maxIdle) |
TransientMortalCacheValue(Object value,
long created,
long lifespan,
long maxIdle,
long lastUsed) |
Modifier and Type | Method and Description |
---|---|
TransientMortalCacheValue |
clone() |
boolean |
equals(Object o) |
long |
getExpiryTime() |
long |
getLastUsed() |
long |
getMaxIdle() |
int |
hashCode() |
boolean |
isExpired() |
boolean |
isExpired(long now) |
void |
setLastUsed(long lastUsed) |
void |
setMaxIdle(long maxIdle) |
InternalCacheEntry |
toInternalCacheEntry(Object key) |
String |
toString() |
canExpire, getCreated, getLifespan, setCreated, setLifespan
getMetadata, getValue, setValue
public TransientMortalCacheValue(Object value, long created, long lifespan, long maxIdle, long lastUsed)
public TransientMortalCacheValue(Object value, long created, long lifespan, long maxIdle)
public long getMaxIdle()
getMaxIdle
in interface InternalCacheValue
getMaxIdle
in class ImmortalCacheValue
public void setMaxIdle(long maxIdle)
public long getLastUsed()
getLastUsed
in interface InternalCacheValue
getLastUsed
in class ImmortalCacheValue
public void setLastUsed(long lastUsed)
public boolean isExpired(long now)
isExpired
in interface InternalCacheValue
isExpired
in class MortalCacheValue
now
- the current time as expressed by System.currentTimeMillis()
public boolean isExpired()
isExpired
in interface InternalCacheValue
isExpired
in class MortalCacheValue
public InternalCacheEntry toInternalCacheEntry(Object key)
toInternalCacheEntry
in interface InternalCacheValue
toInternalCacheEntry
in class MortalCacheValue
public long getExpiryTime()
getExpiryTime
in interface InternalCacheValue
getExpiryTime
in class MortalCacheValue
public boolean equals(Object o)
equals
in class MortalCacheValue
public int hashCode()
hashCode
in class MortalCacheValue
public String toString()
toString
in class MortalCacheValue
public TransientMortalCacheValue clone()
clone
in class MortalCacheValue
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.