ExpiryPolicy that defines the expiry Duration
of a Cache Entry based on the last time it was updated. Updating
includes created and changing (updating) an entry.
ExpiryPolicy
| Modifier and Type | Field and Description |
|---|---|
| private Duration | expiryDuration
The |
| public static final long | serialVersionUID
The serialVersionUID required for |
| Access | Constructor and Description |
|---|---|
| public | ModifiedExpiryPolicy(Duration
the expiryDuration)Duration a Cache Entry should exist be
before it expires after being modifiedConstructs an |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. object)Overrides java. |
| public static Factory | |
| public Duration | getExpiryForAccess()
Implements javax. Duration before an accessed Cache.Entry is
considered expired.
|
| public Duration | getExpiryForCreation()
Implements javax. Duration before a newly created Cache.Entry is considered
expired.
|
| public Duration | getExpiryForUpdate()
Implements javax. Duration before an updated Cache.Entry is considered
expired.
|
| public int |
| expiryDuration | back to summary |
|---|---|
| private Duration expiryDuration The | |
| serialVersionUID | back to summary |
|---|---|
| public static final long serialVersionUID The serialVersionUID required for | |
| ModifiedExpiryPolicy | back to summary |
|---|---|
| public ModifiedExpiryPolicy(Duration expiryDuration) Constructs an | |
| equals | back to summary |
|---|---|
| public boolean equals(Object object) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| factoryOf | back to summary |
|---|---|
| public static Factory Obtains a
| |
| getExpiryForAccess | back to summary |
|---|---|
| public Duration getExpiryForAccess() Implements javax. Doc from javax. Gets the
This method is called by a caching implementation after a Cache.Entry is
accessed to determine the Should an exception occur while determining the Duration, an implementation specific default Duration will be used. | |
| getExpiryForCreation | back to summary |
|---|---|
| public Duration getExpiryForCreation() Implements javax. Doc from javax. Gets the
This method is called by a caching implementation after a Cache.Entry is
created, but before a Cache.Entry is added to a cache, to determine the
Should an exception occur while determining the Duration, an implementation
specific default | |
| getExpiryForUpdate | back to summary |
|---|---|
| public Duration getExpiryForUpdate() Implements javax. Doc from javax. Gets the
This method is called by the caching implementation after a Cache.Entry is
updated to determine the Should an exception occur while determining the Duration, an implementation specific default Duration will be used. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |