org.eclipse.persistence.descriptors.ClassDescriptor , org.eclipse.persistence.descriptors.invalidation.NoExpiryCacheInvalidationPolicy , org.eclipse.persistence.descriptors.invalidation.DailyCacheInvalidationPolicy , org.eclipse.persistence.descriptors.invalidation.TimeToLiveCacheInvalidationPolicy
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | isInvalidationRandomized
Allows the timeToLive to be randomized to avoid bottlenecks. |
| public static final long | |
| protected Random | random
Random used for randomized invalidation. |
| protected boolean | shouldRefreshInvalidObjectsOnClone
Determines if expired object registered in the unit of work should be refreshed, default true. |
| protected boolean | shouldUpdateReadTimeOnUpdate
This will represent objects that do not expire. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public abstract long | |
| public long | |
| public void | initialize(ClassDescriptor descriptor, AbstractSession session)
INTERNAL: Allow initialization with the descriptor. |
| public boolean | |
| public abstract boolean | isInvalidated(CacheKey key, long currentTimeMillis)
INTERNAL: return true if this object is expire, false otherwise. |
| public boolean | |
| public void | setIsInvalidationRandomized(boolean isInvalidationRandomized)
PUBLIC: Allows the timeToLive to be randomized to avoid bottlenecks. |
| public void | setShouldRefreshInvalidObjectsOnClone(boolean shouldRefreshInvalidObjectsOnClone)
PUBLIC: Set if expired object should be refreshed prior to cloning, default is true. |
| public void | setShouldUpdateReadTimeOnUpdate(boolean shouldUpdateReadTime)
PUBLIC: Set whether to update the stored time an object was read when an object is updated. |
| public boolean | shouldRefreshInvalidObjectsOnClone()
PUBLIC: Return if expired object should be refreshed prior to cloning. |
| public boolean | shouldUpdateReadTimeOnUpdate()
PUBLIC: Return whether objects affected by this CacheInvalidationPolicy should have the read time on their cache keys updated when an update occurs. |
| isInvalidationRandomized | back to summary |
|---|---|
| protected boolean isInvalidationRandomized Allows the timeToLive to be randomized to avoid bottlenecks. | |
| NO_EXPIRY | back to summary |
|---|---|
| public static final long NO_EXPIRY | |
| random | back to summary |
|---|---|
| protected Random random Random used for randomized invalidation. | |
| shouldRefreshInvalidObjectsOnClone | back to summary |
|---|---|
| protected boolean shouldRefreshInvalidObjectsOnClone Determines if expired object registered in the unit of work should be refreshed, default true. | |
| shouldUpdateReadTimeOnUpdate | back to summary |
|---|---|
| protected boolean shouldUpdateReadTimeOnUpdate This will represent objects that do not expire. | |
| CacheInvalidationPolicy | back to summary |
|---|---|
| public CacheInvalidationPolicy() | |
| clone | back to summary |
|---|---|
| public Object clone() Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by | |
| getExpiryTimeInMillis | back to summary |
|---|---|
| public abstract long getExpiryTimeInMillis(CacheKey key) INTERNAL: Get the next time when this object will become invalid | |
| getRemainingValidTime | back to summary |
|---|---|
| public long getRemainingValidTime(CacheKey key) INTERNAL: Return the remaining life of this object | |
| initialize | back to summary |
|---|---|
| public void initialize(ClassDescriptor descriptor, AbstractSession session) INTERNAL: Allow initialization with the descriptor. | |
| isInvalidated | back to summary |
|---|---|
| public boolean isInvalidated(CacheKey key) INTERNAL: return true if this object is expire, false otherwise. | |
| isInvalidated | back to summary |
|---|---|
| public abstract boolean isInvalidated(CacheKey key, long currentTimeMillis) INTERNAL: return true if this object is expire, false otherwise. | |
| isInvalidationRandomized | back to summary |
|---|---|
| public boolean isInvalidationRandomized() PUBLIC: Allows the timeToLive to be randomized to avoid bottlenecks. | |
| setIsInvalidationRandomized | back to summary |
|---|---|
| public void setIsInvalidationRandomized(boolean isInvalidationRandomized) PUBLIC: Allows the timeToLive to be randomized to avoid bottlenecks. | |
| setShouldRefreshInvalidObjectsOnClone | back to summary |
|---|---|
| public void setShouldRefreshInvalidObjectsOnClone(boolean shouldRefreshInvalidObjectsOnClone) PUBLIC: Set if expired object should be refreshed prior to cloning, default is true. Applies to Protected Entities and UnitOfWork registration. | |
| setShouldUpdateReadTimeOnUpdate | back to summary |
|---|---|
| public void setShouldUpdateReadTimeOnUpdate(boolean shouldUpdateReadTime) PUBLIC: Set whether to update the stored time an object was read when an object is updated. When the read time is updated, it indicates to EclipseLink that the data in the object is up to date. This means that cache invalidation checks will occur relative to the new read time. By default, the read time will not be updated when an object is updated. Often it is possible to be confident that the object is up to date after an update because otherwise the update will fail because of the locking policies in use. | |
| shouldRefreshInvalidObjectsOnClone | back to summary |
|---|---|
| public boolean shouldRefreshInvalidObjectsOnClone() PUBLIC: Return if expired object should be refreshed prior to cloning. Applies to Protected Entities and UnitOfWork registration. | |
| shouldUpdateReadTimeOnUpdate | back to summary |
|---|---|
| public boolean shouldUpdateReadTimeOnUpdate() PUBLIC: Return whether objects affected by this CacheInvalidationPolicy should have the read time on their cache keys updated when an update occurs. | |