javax.cache.event
Interface CacheEntryCreatedListener<K,V>

Type Parameters:
K - the type of keys maintained by the associated cache
V - the type of values maintained by the associated cache
All Superinterfaces:
CacheEntryListener<K,V>, EventListener

public interface CacheEntryCreatedListener<K,V>
extends CacheEntryListener<K,V>

Invoked if a cache entry is created, for example through a Cache.put(Object, Object) operation. If an entry for the key existed prior to the operation it is not invoked, as this ia an update.

Since:
1.0
Author:
Yannis Cosmadopoulos, Greg Luck
See Also:
CacheEntryUpdatedListener

Method Summary
 void onCreate(Cache.Entry<K,V> entry)
          Called after the entry has been created (put into the cache where no previous mapping existed).
 void onCreateAll(Iterable<Cache.Entry<K,V>> entries)
          Called after the entries have been created (put into the cache where no previous mapping existed).
 
Methods inherited from interface javax.cache.event.CacheEntryListener
getNotificationScope
 

Method Detail

onCreate

void onCreate(Cache.Entry<K,V> entry)
Called after the entry has been created (put into the cache where no previous mapping existed). This method is not called if a batch operation was performed.

Parameters:
entry - The entry just added.
See Also:
onCreateAll(Iterable)

onCreateAll

void onCreateAll(Iterable<Cache.Entry<K,V>> entries)
Called after the entries have been created (put into the cache where no previous mapping existed).

Parameters:
entries - The entries just added.


Copyright © 2011. All Rights Reserved.