Package | Description |
---|---|
org.cache2k |
API package for cache2k Java caching library.
|
org.cache2k.event |
Events that are fired on behalf of a cache operation.
|
org.cache2k.expiry |
Set of interfaces for customizing the expiry behavior.
|
org.cache2k.integration |
Loader and writer to integrate with external data sources.
|
org.cache2k.processor |
Entry processor and supporting types for custom atomic operations on a cache entry.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCacheEntry<K,V>
Deprecated.
Will be removed in 2.0
|
Modifier and Type | Method and Description |
---|---|
CacheEntry<K,V> |
Cache.getEntry(K key)
Returns an entry that contains the cache value associated with the given key.
|
CacheEntry<K,V> |
ForwardingCache.getEntry(K key) |
CacheEntry<K,V> |
AbstractCache.getEntry(K key) |
CacheEntry<K,V> |
Cache.peekEntry(K key)
Returns an entry that contains the cache value associated with the given key.
|
CacheEntry<K,V> |
ForwardingCache.peekEntry(K key) |
CacheEntry<K,V> |
AbstractCache.peekEntry(K key) |
Modifier and Type | Method and Description |
---|---|
Iterable<CacheEntry<K,V>> |
Cache.entries()
Iterate all entries in the cache.
|
Iterable<CacheEntry<K,V>> |
ForwardingCache.entries() |
Iterable<CacheEntry<K,V>> |
AbstractCache.entries() |
Modifier and Type | Method and Description |
---|---|
void |
CacheEntryCreatedListener.onEntryCreated(Cache<K,V> cache,
CacheEntry<K,V> entry)
Called for the creation of a cache entry and after all cache writers ran successfully.
|
void |
CacheEntryEvictedListener.onEntryEvicted(Cache<K,V> cache,
CacheEntry<K,V> entry)
Called upon eviction of a cache entry.
|
void |
CacheEntryExpiredListener.onEntryExpired(Cache<K,V> cache,
CacheEntry<K,V> entry)
Called after the expiry of an entry.
|
void |
CacheEntryRemovedListener.onEntryRemoved(Cache<K,V> cache,
CacheEntry<K,V> entry)
Called after the removal of a cache entry and after all cache writers ran successfully.
|
void |
CacheEntryUpdatedListener.onEntryUpdated(Cache<K,V> cache,
CacheEntry<K,V> currentEntry,
CacheEntry<K,V> entryWithNewData)
Called after a mutation of a cache entry and after all cache writers ran successfully.
|
void |
CacheEntryUpdatedListener.onEntryUpdated(Cache<K,V> cache,
CacheEntry<K,V> currentEntry,
CacheEntry<K,V> entryWithNewData)
Called after a mutation of a cache entry and after all cache writers ran successfully.
|
Modifier and Type | Method and Description |
---|---|
long |
ExpiryPolicy.calculateExpiryTime(K key,
V value,
long loadTime,
CacheEntry<K,V> oldEntry)
Returns the time of expiry in milliseconds since epoch.
|
Modifier and Type | Method and Description |
---|---|
CacheEntry<K,V> |
AsyncCacheLoader.Context.getCurrentEntry()
Current entry in the cache.
|
Modifier and Type | Method and Description |
---|---|
abstract V |
AdvancedCacheLoader.load(K key,
long startTime,
CacheEntry<K,V> currentEntry)
Retrieves or generates data based on the key parameter.
|
abstract long |
ResiliencePolicy.suppressExceptionUntil(K key,
ExceptionInformation exceptionInformation,
CacheEntry<K,V> cachedContent)
Called after the loader threw an exception and a previous value is available.
|
Modifier and Type | Interface and Description |
---|---|
interface |
MutableCacheEntry<K,V>
A mutable entry is used inside the
EntryProcessor to perform
updates and retrieve information from a cache entry. |
cache2k API documentation. Copyright © 2000–2020 headissue GmbH, Munich.