Package org.cache2k.event
Interface CacheEntryCreatedListener<K,V>
-
- All Superinterfaces:
CacheEntryOperationListener<K,V>
,DataAware<K,V>
,EventListener
public interface CacheEntryCreatedListener<K,V> extends CacheEntryOperationListener<K,V>
A new entry is inserted into the cache, e.g. byCache.put(Object, Object)
or by read through and theCacheLoader
.- Author:
- Jens Wilke
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onEntryCreated(Cache<K,V> cache, CacheEntry<K,V> entry)
Called for the creation of a cache entry and after all cache writers ran successfully.
-
-
-
Method Detail
-
onEntryCreated
void onEntryCreated(Cache<K,V> cache, CacheEntry<K,V> entry) throws Exception
Called for the creation of a cache entry and after all cache writers ran successfully. A synchronous event is executed before the entry becomes visible for cache clients. If an inserted or loaded value expires immediately, no created event is sent.Exceptions thrown by asynchronous listeners will be propagated to the cache client directly.
- Parameters:
cache
- Reference to the cache that generated the event.entry
- 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.- Throws:
Exception
-
-