public interface CacheEntry<K,V>
nullor contains an exception. Entries can be retrieved by
Cache.getEntry(Object)or via iterated via
After retrieved, the entry instance does not change its values, even if the value for its key is updated in the cache.
Design note: The cache is generally also aware of the time the object will be refreshed next or when it will expire. This is not exposed to applications by intention.
|Modifier and Type||Method and Description|
The exception happened when the value was loaded and the exception could not be suppressed.
Key associated with this entry.
permanently not supported any more, you may use
Value of the entry.
nullif permitted for this cache via
Cache2kBuilder.permitNullValues(boolean). If the entry had a loader exception which is not suppressed, this exception will be propagated. This can be customized with
CacheLoaderException- if the loading produced an exception
nullif no exception happened or it was suppressed. If
getValue()returns a value and does not throw an exception.
Functionality was present in version 1.0, but was removed
for version 1.2. To access the last modification time it is possible to
More rationale see GH#84. The method is planed to be removed for version 2.0.
AbstractCacheEntry can be used for implementations of this class to avoid implementing this method.
UnsupportedOperationException- always thrown
cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.