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 | Method and Description |
---|---|
CacheEntry<K,V> |
AbstractCache.getEntry(K key) |
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.peekEntry(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) |
Modifier and Type | Method and Description |
---|---|
Iterable<CacheEntry<K,V>> |
AbstractCache.entries() |
Iterable<CacheEntry<K,V>> |
Cache.entries()
Iterate all entries in the cache.
|
Iterable<CacheEntry<K,V>> |
ForwardingCache.entries() |
Modifier and Type | Method and Description |
---|---|
void |
CacheEntryCreatedListener.onEntryCreated(Cache<K,V> cache,
CacheEntry<K,V> entry)
Called after a creation of a cache entry and after all cache writers ran successfully.
|
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 |
---|---|
abstract V |
AdvancedCacheLoader.load(K key,
long currentTime,
CacheEntry<K,V> currentEntry)
Retrieves or generates data based on the key.
|
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–2017 headissue GmbH, Munich.