public abstract class CacheInvalidationPolicy
extends java.lang.Object
implements java.io.Serializable
oracle.toplink.essentials.publicinterface.Descriptor
,
oracle.toplink.essentials.descriptors.cacheinvalidation.NoExpiryCacheInvalidationPolicy
,
oracle.toplink.essentials.descriptors.cacheinvalidation.DailyCacheInvalidationPolicy
,
oracle.toplink.essentials.descriptors.cacheinvalidation.TimeToLiveCacheInvalidationPolicy
,
Serialized FormModifier and Type | Field and Description |
---|---|
static long |
NO_EXPIRY |
protected boolean |
shouldUpdateReadTimeOnUpdate
this will represent objects that do not expire
|
Constructor and Description |
---|
CacheInvalidationPolicy() |
Modifier and Type | Method and Description |
---|---|
abstract long |
getExpiryTimeInMillis(CacheKey key)
INTERNAL:
Get the next time when this object will become invalid
|
long |
getRemainingValidTime(CacheKey key)
INTERNAL:
Return the remaining life of this object
|
abstract boolean |
isInvalidated(CacheKey key,
long currentTimeMillis)
INTERNAL:
return true if this object is expire, false otherwise.
|
void |
setShouldUpdateReadTimeOnUpdate(boolean shouldUpdateReadTime)
PUBLIC:
Set whether to update the stored time an object was read when an object is updated.
|
boolean |
shouldUpdateReadTimeOnUpdate()
PUBLIC:
Return whether objects affected by this CacheInvalidationPolicy should have
the read time on their cache keys updated when an update occurs.
|
public static final long NO_EXPIRY
protected boolean shouldUpdateReadTimeOnUpdate
public abstract long getExpiryTimeInMillis(CacheKey key)
public long getRemainingValidTime(CacheKey key)
public abstract boolean isInvalidated(CacheKey key, long currentTimeMillis)
public void setShouldUpdateReadTimeOnUpdate(boolean shouldUpdateReadTime)
public boolean shouldUpdateReadTimeOnUpdate()