Package org.cache2k.event
Interface CacheEntryUpdatedListener<K,V>
-
- All Superinterfaces:
CacheEntryOperationListener<K,V>
,DataAware<K,V>
,EventListener
public interface CacheEntryUpdatedListener<K,V> extends CacheEntryOperationListener<K,V>
Fires in case a cache entry is mutated. This happens onCache.put(K, V)
and its variants if a previous entry exists, or if a value is reloaded or refreshed after expiry.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onEntryUpdated(Cache<K,V> cache, CacheEntry<K,V> currentEntry, CacheEntry<K,V> newEntry)
Called after a mutation of a cache entry and after all cache writers ran successfully.
-
-
-
Method Detail
-
onEntryUpdated
void onEntryUpdated(Cache<K,V> cache, CacheEntry<K,V> currentEntry, CacheEntry<K,V> newEntry) throws Exception
Called after a mutation of a cache entry and after all cache writers ran successfully.Exceptions thrown by asynchronous listeners will be propagated to the cache client directly.
- Parameters:
cache
- Reference to the cache that generated the event.currentEntry
- Entry containing the current data. It is only valid to access the object during the call of this method. The object value may become invalid afterwards.newEntry
- entry containing the data after the update operation was applied. The data will be visible after all synchronous events are processed. It is only valid to access the object during the call of this method. The object value may become invalid afterwards.- Throws:
Exception
-
-