public interface SimpleCacheEntry<K,V>
null
or contains an exception. The simple entry does not
provide a timestamp of the last modification, which allows the entry
to be retrieved at a lower cost.
Entries can be retrieved by
Cache.peekSimpleEntry(Object)
or Cache.getSimpleEntry(Object)
.
After retrieved, the entry instance does not change its values, even if the value for its key is updated in the cache.
Cache.peekSimpleEntry(Object)
,
Cache.getSimpleEntry(Object)
Modifier and Type | Method and Description |
---|---|
Throwable |
getException()
The exception happened when the value was loaded and
the exception could not be suppressed.
|
K |
getKey()
Key associated with this entry.
|
V |
getValue()
Value of the entry.
|
K getKey()
V getValue()
null
if 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 method does ignore a custom exception propagator set via
Cache2kBuilder.exceptionPropagator(ExceptionPropagator)
CacheLoaderException
- if the loading produced an exception .Throwable getException()
null
if no exception
happened or it was suppressed. If null
then getValue()
returns a value and does not throw an exception.cache2k API documentation. Copyright © 2000–2018 headissue GmbH, Munich.