K
- the key type for the cacheV
- the value type for the cachepublic class EhCache3Expiry<K,V> extends Object implements org.ehcache.expiry.ExpiryPolicy<K,V>
Expiry
which gets TTL from the value object if it's instance of a CachedEntry
otherwise returns Duration#INFINITE
.Constructor and Description |
---|
EhCache3Expiry() |
Modifier and Type | Method and Description |
---|---|
Long |
getAccess() |
Long |
getCreate() |
Duration |
getExpiryForAccess(K key,
Supplier<? extends V> value) |
Duration |
getExpiryForCreation(K key,
V value) |
Duration |
getExpiryForUpdate(K key,
Supplier<? extends V> oldValue,
V newValue) |
Long |
getUpdate() |
void |
setAccess(Long access) |
void |
setCreate(Long create) |
void |
setUpdate(Long update) |
public Duration getExpiryForUpdate(K key, Supplier<? extends V> oldValue, V newValue)
public Long getCreate()
public void setCreate(Long create)
public Long getAccess()
public void setAccess(Long access)
public Long getUpdate()
public void setUpdate(Long update)
Copyright © 2020 Magnolia International Ltd.. All rights reserved.