javax.cache.event
Interface CacheEntryRemovedListener<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 CacheEntryRemovedListener<K,V>
extends CacheEntryListener<K,V>

Invoked if a cache entry is removed, for example through a Cache.remove(Object) call.

Since:
1.0
Author:
Yannis Cosmadopoulos, Greg Luck

Method Summary
 void onRemove(Cache.Entry<K,V> entry)
          Called after the entry has been removed.
 void onRemoveAll(Iterable<Cache.Entry<K,V>> entries)
          Called after the entries have been removed by a batch operation.
 
Methods inherited from interface javax.cache.event.CacheEntryListener
getNotificationScope
 

Method Detail

onRemove

void onRemove(Cache.Entry<K,V> entry)
Called after the entry has been removed. If no entry existed for key the event is not called. This method is not called if a batch operation was performed.

Parameters:
entry - The entry just removed.
See Also:
onRemoveAll(Iterable)

onRemoveAll

void onRemoveAll(Iterable<Cache.Entry<K,V>> entries)
Called after the entries have been removed by a batch operation.

Parameters:
entries - The entry just removed.


Copyright © 2011. All Rights Reserved.