public interface InternalCacheValue
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, where an existing InternalCacheEntry is already referenced.
Use of this interface 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.
Modifier and Type | Method and Description |
---|---|
boolean |
canExpire() |
long |
getCreated() |
long |
getLastUsed() |
long |
getLifespan() |
long |
getMaxIdle() |
Object |
getValue() |
boolean |
isExpired() |
boolean |
isExpired(long now) |
InternalCacheEntry |
toInternalCacheEntry(Object key) |
Object getValue()
InternalCacheEntry toInternalCacheEntry(Object key)
boolean isExpired(long now)
now
- the current time as expressed by System.currentTimeMillis()
boolean isExpired()
boolean canExpire()
long getCreated()
long getLastUsed()
long getLifespan()
long getMaxIdle()
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.