Class DailyCacheInvalidationPolicy
- java.lang.Object
- 
- org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicy
- 
- org.eclipse.persistence.descriptors.invalidation.DailyCacheInvalidationPolicy
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Cloneable
 
 public class DailyCacheInvalidationPolicy extends CacheInvalidationPolicy 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.- See Also:
- CacheInvalidationPolicy, Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.CalendarexpiryTimeprotected java.util.CalendarpreviousExpiry- 
Fields inherited from class org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicyisInvalidationRandomized, NO_EXPIRY, random, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate
 
- 
 - 
Constructor SummaryConstructors Constructor 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.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()java.util.CalendargetExpiryTime()INTERNAL: Get the expiry time as a Calendar.longgetExpiryTimeInMillis(org.eclipse.persistence.internal.identitymaps.CacheKey key)INTERNAL: Return the next expiry time.voidincrementExpiry()INTERNAL: Update the expiry time to be the day after the current day.booleanisInvalidated(org.eclipse.persistence.internal.identitymaps.CacheKey key, long currentTimeMillis)INTERNAL: Return true if this object has expire or is invalidvoidsetExpiryTime(int hour, int minute, int second, int millisecond)PUBLIC: Set a new expiry time for this object Provide the hour, minute, second and millisecond.voidsetExpiryTime(java.util.Calendar calendar)INTERNAL: Set the expiry time based on a Calendar.- 
Methods inherited from class org.eclipse.persistence.descriptors.invalidation.CacheInvalidationPolicygetRemainingValidTime, initialize, isInvalidated, isInvalidationRandomized, setIsInvalidationRandomized, setShouldRefreshInvalidObjectsInUnitOfWork, setShouldRefreshInvalidObjectsOnClone, setShouldUpdateReadTimeOnUpdate, shouldRefreshInvalidObjectsInUnitOfWork, shouldRefreshInvalidObjectsOnClone, shouldUpdateReadTimeOnUpdate
 
- 
 
- 
- 
- 
Constructor Detail- 
DailyCacheInvalidationPolicypublic 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.
 - 
DailyCacheInvalidationPolicypublic 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. Provide the hour, minute, second and millisecond. Objects that make use of this policy will be set to expire at that exact time every day.
 
- 
 - 
Method Detail- 
getExpiryTimeInMillispublic long getExpiryTimeInMillis(org.eclipse.persistence.internal.identitymaps.CacheKey key) INTERNAL: Return the next expiry time.- Specified by:
- getExpiryTimeInMillisin class- CacheInvalidationPolicy
 
 - 
getExpiryTimepublic java.util.Calendar getExpiryTime() INTERNAL: Get the expiry time as a Calendar. Used for setting the expiry time in deployment XML
 - 
isInvalidatedpublic boolean isInvalidated(org.eclipse.persistence.internal.identitymaps.CacheKey key, long currentTimeMillis)INTERNAL: Return true if this object has expire or is invalid- Specified by:
- isInvalidatedin class- CacheInvalidationPolicy
 
 - 
incrementExpirypublic void incrementExpiry() INTERNAL: Update the expiry time to be the day after the current day.
 - 
setExpiryTimepublic 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. Objects which make use of this policy will be set to expire at that exact time every day.
 - 
setExpiryTimepublic void setExpiryTime(java.util.Calendar calendar) INTERNAL: Set the expiry time based on a Calendar. Used for setting the expiry time from deployment XML.
 - 
clonepublic java.lang.Object clone() - Overrides:
- clonein class- CacheInvalidationPolicy
 
 
- 
 
-