public class TransientCacheValue extends ImmortalCacheValue
TransientCacheEntry
Modifier and Type | Class and Description |
---|---|
static class |
TransientCacheValue.Externalizer |
Modifier and Type | Field and Description |
---|---|
protected long |
lastUsed |
protected long |
maxIdle |
value
Constructor and Description |
---|
TransientCacheValue(Object value,
long maxIdle,
long lastUsed) |
Modifier and Type | Method and Description |
---|---|
boolean |
canExpire() |
TransientCacheValue |
clone() |
boolean |
equals(Object o) |
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() |
getCreated, getLifespan, getValue, setValue
public TransientCacheValue(Object value, long maxIdle, long lastUsed)
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 final boolean isExpired(long now)
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
now
- the current time as expressed by System.currentTimeMillis()
public final boolean isExpired()
isExpired
in interface InternalCacheValue
isExpired
in class ImmortalCacheValue
public boolean canExpire()
canExpire
in interface InternalCacheValue
canExpire
in class ImmortalCacheValue
public InternalCacheEntry toInternalCacheEntry(Object key)
toInternalCacheEntry
in interface InternalCacheValue
toInternalCacheEntry
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 TransientCacheValue clone()
clone
in class ImmortalCacheValue
Copyright © 2017 JBoss, a division of Red Hat. All Rights Reserved.