com.hazelcast.core
Interface EntryListener<K,V>

Type Parameters:
K - key of the map entry
V - value of the map entry.
All Superinterfaces:
EventListener
All Known Implementing Classes:
ClientConsoleApp, ConsoleApp, EntryAdapter

public interface EntryListener<K,V>
extends EventListener

Map Entry listener to get notified when a map entry is added, removed, updated or evicted. Events will fire as a result of operations carried out via the IMap interface. Events will not fire, for example, for an entry that comes into the Map via the MapLoader lifecycle.

See Also:
IMap.addEntryListener(EntryListener, boolean)

Method Summary
 void entryAdded(EntryEvent<K,V> event)
          Invoked when an entry is added.
 void entryEvicted(EntryEvent<K,V> event)
          Invoked when an entry is evicted.
 void entryRemoved(EntryEvent<K,V> event)
          Invoked when an entry is removed.
 void entryUpdated(EntryEvent<K,V> event)
          Invoked when an entry is updated.
 void mapCleared(MapEvent event)
          Invoked when all entries are removed by IMap.clear().
 void mapEvicted(MapEvent event)
          Invoked when all entries are evicted by IMap.evictAll().
 

Method Detail

entryAdded

void entryAdded(EntryEvent<K,V> event)
Invoked when an entry is added.

Parameters:
event - the event invoked when an entry is added

entryRemoved

void entryRemoved(EntryEvent<K,V> event)
Invoked when an entry is removed.

Parameters:
event - the event invoked when an entry is removed

entryUpdated

void entryUpdated(EntryEvent<K,V> event)
Invoked when an entry is updated.

Parameters:
event - the event invoked when an entry is updated

entryEvicted

void entryEvicted(EntryEvent<K,V> event)
Invoked when an entry is evicted.

Parameters:
event - the event invoked when an entry is evicted

mapEvicted

void mapEvicted(MapEvent event)
Invoked when all entries are evicted by IMap.evictAll().

Parameters:
event - the map event invoked when all entries are evicted by IMap.evictAll()

mapCleared

void mapCleared(MapEvent event)
Invoked when all entries are removed by IMap.clear().

Parameters:
event - the map event invoked when all entries are removed by IMap.clear()


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.