|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.cache.ExpiryPolicy.Default<K,V>
public static final class ExpiryPolicy.Default<K,V>
The default ExpiryPolicy specifies that Cache Entries
won't expire. This however doesn't mean they won't be expired if an
underlying implementation needs to free-up resources where by it may
choose to expire entries that are not due to expire.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface javax.cache.ExpiryPolicy |
|---|
ExpiryPolicy.Accessed<K,V>, ExpiryPolicy.Default<K,V>, ExpiryPolicy.Modified<K,V> |
| Constructor Summary | |
|---|---|
ExpiryPolicy.Default()
|
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
|
Configuration.Duration |
getTTLForAccessedEntry(Cache.Entry<? extends K,? extends V> entry,
Configuration.Duration duration)
Gets the time-to-live before the accessed Cache.Entry is considered expired. |
Configuration.Duration |
getTTLForCreatedEntry(Cache.Entry<? extends K,? extends V> entry)
Gets the time-to-live before the newly Cache.Entry is considered expired. |
Configuration.Duration |
getTTLForModifiedEntry(Cache.Entry<? extends K,? extends V> entry,
Configuration.Duration duration)
Gets the time-to-live before the modified Cache.Entry is considered expired. |
int |
hashCode()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExpiryPolicy.Default()
| Method Detail |
|---|
public Configuration.Duration getTTLForCreatedEntry(Cache.Entry<? extends K,? extends V> entry)
Configuration.Duration before the
said entry expires. If a Configuration.Duration.ZERO is returned the Cache.Entry is
considered to be already expired and will not be added to the Cache.
getTTLForCreatedEntry in interface ExpiryPolicy<K,V>entry - the cache entry that was created
public Configuration.Duration getTTLForAccessedEntry(Cache.Entry<? extends K,? extends V> entry,
Configuration.Duration duration)
Configuration.Duration before the said entry expires in the future. If a
Configuration.Duration.ZERO is returned the Cache.Entry will be considered
expired for future access.
getTTLForAccessedEntry in interface ExpiryPolicy<K,V>entry - the cache entry that was accessedduration - the current Configuration.Duration before the entry expires
public Configuration.Duration getTTLForModifiedEntry(Cache.Entry<? extends K,? extends V> entry,
Configuration.Duration duration)
Configuration.Duration before the updated entry expires. If a
Configuration.Duration.ZERO is returned the Cache.Entry is considered already
expired.
getTTLForModifiedEntry in interface ExpiryPolicy<K,V>entry - the cache entry that was modifiedduration - the current Configuration.Duration before the updated entry expires
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||