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

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

Since:
1.0
Author:
Yannis Cosmadopoulos, Greg Luck

Method Summary
 void onRead(Cache.Entry<K,V> entry)
          Called after the entry has been read.
 void onReadAll(Iterable<Cache.Entry<K,V>> entries)
          Called after the entries have been read.
 
Methods inherited from interface javax.cache.event.CacheEntryListener
getNotificationScope
 

Method Detail

onRead

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

Parameters:
entry - The entry just read.
See Also:
onReadAll(Iterable)

onReadAll

void onReadAll(Iterable<Cache.Entry<K,V>> entries)
Called after the entries have been read. Only entries which existed in the cache are passed in.

Parameters:
entries - The entry just read.


Copyright © 2011. All Rights Reserved.