|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy org.eclipse.persistence.descriptors.invalidation.DailyCacheInvalidationPolicy
public class DailyCacheInvalidationPolicy
PUBLIC: A CacheInvalidationPolicy that allows objects to expire every day at a specific time. A daily cache invalidation policy is created with an hour, minute, second and millisecond when objects will expire. Objects will expire in the cache every day at that time.
CacheInvalidationPolicy
,
Serialized FormField Summary | |
---|---|
protected java.util.Calendar |
expiryTime
|
protected java.util.Calendar |
previousExpiry
|
Fields inherited from class org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy |
---|
isInvalidationRandomized, NO_EXPIRY, random, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy |
---|
getRemainingValidTime, initialize, isInvalidated, isInvalidationRandomized, setIsInvalidationRandomized, setShouldRefreshInvalidObjectsInUnitOfWork, setShouldRefreshInvalidObjectsOnClone, setShouldUpdateReadTimeOnUpdate, shouldRefreshInvalidObjectsInUnitOfWork, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Calendar expiryTime
protected java.util.Calendar previousExpiry
Constructor Detail |
---|
public DailyCacheInvalidationPolicy()
public DailyCacheInvalidationPolicy(int hour, int minute, int second, int millisecond)
Method Detail |
---|
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
|
EclipseLink 2.4.2, build 'v20130514-5956486' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |