public class DailyCacheInvalidationPolicy extends CacheInvalidationPolicy
CacheInvalidationPolicy
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected java.util.Calendar |
expiryTime |
protected java.util.Calendar |
previousExpiry |
isInvalidationRandomized, NO_EXPIRY, random, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate
Constructor and Description |
---|
DailyCacheInvalidationPolicy()
INTERNAL:
Default constructor for Project XML
if setters are not called to set expiry times, expiry time will be the time of
day at which this object is instantiated.
|
DailyCacheInvalidationPolicy(int hour,
int minute,
int second,
int millisecond)
PUBLIC:
Construct a daily policy that will allow objects to expire at a specific time of day.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
java.util.Calendar |
getExpiryTime()
INTERNAL:
Get the expiry time as a Calendar.
|
long |
getExpiryTimeInMillis(org.eclipse.persistence.internal.identitymaps.CacheKey key)
INTERNAL:
Return the next expiry time.
|
void |
incrementExpiry()
INTERNAL:
Update the expiry time to be the day after the current day.
|
boolean |
isInvalidated(org.eclipse.persistence.internal.identitymaps.CacheKey key,
long currentTimeMillis)
INTERNAL:
Return true if this object has expire or is invalid
|
void |
setExpiryTime(java.util.Calendar calendar)
INTERNAL:
Set the expiry time based on a Calendar.
|
void |
setExpiryTime(int hour,
int minute,
int second,
int millisecond)
PUBLIC:
Set a new expiry time for this object
Provide the hour, minute, second and millisecond.
|
getRemainingValidTime, initialize, isInvalidated, isInvalidationRandomized, setIsInvalidationRandomized, setShouldRefreshInvalidObjectsInUnitOfWork, setShouldRefreshInvalidObjectsOnClone, setShouldUpdateReadTimeOnUpdate, shouldRefreshInvalidObjectsInUnitOfWork, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate
protected java.util.Calendar expiryTime
protected java.util.Calendar previousExpiry
public DailyCacheInvalidationPolicy()
public DailyCacheInvalidationPolicy(int hour, int minute, int second, int millisecond)
public long getExpiryTimeInMillis(org.eclipse.persistence.internal.identitymaps.CacheKey key)
getExpiryTimeInMillis
in class CacheInvalidationPolicy
public java.util.Calendar getExpiryTime()
public boolean isInvalidated(org.eclipse.persistence.internal.identitymaps.CacheKey key, long currentTimeMillis)
isInvalidated
in class CacheInvalidationPolicy
public void incrementExpiry()
public void setExpiryTime(int hour, int minute, int second, int millisecond)
public void setExpiryTime(java.util.Calendar calendar)
public java.lang.Object clone()
clone
in class CacheInvalidationPolicy