public interface InternalCacheEntry extends CacheEntry, Cloneable
Modifier and Type | Method and Description |
---|---|
boolean |
canExpire() |
InternalCacheEntry |
clone() |
long |
getCreated() |
long |
getExpiryTime()
Only used with entries that have a lifespan, this determines when an entry is due to expire.
|
long |
getLastUsed() |
boolean |
isExpired()
Deprecated.
use
isExpired(long) |
boolean |
isExpired(long now) |
void |
reincarnate()
Deprecated.
|
void |
reincarnate(long now)
"Reincarnates" an entry.
|
InternalCacheValue |
toInternalCacheValue()
Creates a representation of this entry as an
InternalCacheValue . |
void |
touch()
Deprecated.
use
touch(long) |
void |
touch(long currentTimeMillis)
Updates access timestamps on this instance to a specified time
|
commit, getKey, getLifespan, getMaxIdle, getValue, isChanged, isCreated, isEvicted, isLoaded, isNull, isRemoved, isValid, rollback, setChanged, setCreated, setEvicted, setLoaded, setRemoved, setSkipRemoteGet, setValid, setValue, skipRemoteGet, undelete
getMetadata, setMetadata
boolean isExpired(long now)
now
- the current time as defined by System.currentTimeMillis()
or TimeService.wallClockTime()
@Deprecated boolean isExpired()
isExpired(long)
boolean canExpire()
long getCreated()
long getLastUsed()
long getExpiryTime()
@Deprecated void touch()
touch(long)
void touch(long currentTimeMillis)
currentTimeMillis
- the current time as defined by System.currentTimeMillis()
or TimeService.wallClockTime()
@Deprecated void reincarnate()
reincarnate(long)
void reincarnate(long now)
now
- the current time as defined by System.currentTimeMillis()
or TimeService.wallClockTime()
InternalCacheValue toInternalCacheValue()
InternalCacheValue
. The main
purpose of this is to provide a representation that does not have a reference to the key. This is useful in
situations where the key is already known or stored elsewhere, making serialization and deserialization more
efficient.
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. This 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.
InternalCacheEntry clone()
Copyright © 2014 JBoss, a division of Red Hat. All Rights Reserved.