K
- the type of keysV
- the type of valuespublic interface ExpiryPolicy<K,V>
Duration
that of which specifies the
amount of time that must pass before a cache entry is considered expired.Modifier and Type | Method and Description |
---|---|
Duration |
getExpiryForAccessedEntry(Cache.Entry<? extends K,? extends V> entry)
Gets the duration before the accessed Cache.Entry is considered expired.
|
Duration |
getExpiryForCreatedEntry(Cache.Entry<? extends K,? extends V> entry)
Gets the duration before the newly Cache.Entry is considered expired.
|
Duration |
getExpiryForModifiedEntry(Cache.Entry<? extends K,? extends V> entry)
Gets the duration before the modified Cache.Entry is considered expired.
|
Duration getExpiryForCreatedEntry(Cache.Entry<? extends K,? extends V> entry)
Duration
before the said entry expires. If a Duration.ZERO
is returned the Cache.Entry is considered to be already expired and will
not be added to the Cache.
Should an exception occur while determining the Duration, an implementation
specific default Duration will be used.entry
- the cache entry that was createdDuration getExpiryForAccessedEntry(Cache.Entry<? extends K,? extends V> entry)
Duration
before the said entry expires in
the future. If a Duration.ZERO
is returned the Cache.Entry will be
considered expired for future access. Returning null
will
result in no change to the previously understood expiry Duration
.
Should an exception occur while determining the Duration, an implementation
specific default Duration will be used.entry
- the cache entry that was accessedDuration getExpiryForModifiedEntry(Cache.Entry<? extends K,? extends V> entry)
Duration
before the updated entry expires.
If a Duration.ZERO
is returned the Cache.Entry is considered already
expired. Returning null
will result in no change to the
previously understood expiry Duration
.
Should an exception occur while determining the Duration, an implementation
specific default Duration will be used.entry
- the cache entry that was modifiedCopyright © 2013. All Rights Reserved.