public class TimeToLiveCacheInvalidationPolicy extends CacheInvalidationPolicy
CacheInvalidationPolicy
,
Serialized FormNO_EXPIRY
Constructor and Description |
---|
TimeToLiveCacheInvalidationPolicy()
INTERNAL:
Default Constructor for Project XML
Unless the timeToLive is set by method, objects will expire immediately
|
TimeToLiveCacheInvalidationPolicy(long timeToLive)
PUBLIC:
Construct a TimeToLiveCacheInvalidationPolicy
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
long |
getExpiryTimeInMillis(CacheKey key)
INTERNAL:
Return the next expiry time.
|
long |
getTimeToLive()
PUBLIC:
Return the time-to-live specified for this policy.
|
boolean |
isInvalidated(CacheKey key,
long currentTimeMillis)
INTERNAL:
Return true if this object is set as invalid or has expired.
|
void |
setTimeToLive(long timeToLive)
PUBLIC:
Set the time-to-live specified by this policy.
|
getRemainingValidTime, initialize, isInvalidated, isInvalidationRandomized, setIsInvalidationRandomized, setShouldRefreshInvalidObjectsInUnitOfWork, setShouldRefreshInvalidObjectsOnClone, setShouldUpdateReadTimeOnUpdate, shouldRefreshInvalidObjectsInUnitOfWork, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate
public TimeToLiveCacheInvalidationPolicy()
public TimeToLiveCacheInvalidationPolicy(long timeToLive)
timeToLive
- the number of milliseconds an object affected by this policy will live.public long getExpiryTimeInMillis(CacheKey key)
getExpiryTimeInMillis
in class CacheInvalidationPolicy
public long getTimeToLive()
public boolean isInvalidated(CacheKey key, long currentTimeMillis)
isInvalidated
in class CacheInvalidationPolicy
public void setTimeToLive(long timeToLive)
public java.lang.Object clone()
clone
in class CacheInvalidationPolicy
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference