K
- key of the map entryV
- value of the map entry.public class MapListenerAdapter<K,V> extends Object implements EntryAddedListener<K,V>, EntryUpdatedListener<K,V>, EntryRemovedListener<K,V>, EntryEvictedListener<K,V>, EntryExpiredListener<K,V>, EntryMergedListener<K,V>, EntryLoadedListener<K,V>, MapClearedListener, MapEvictedListener
MapListener
.
The difference between this adapter and EntryAdapter
is,
EntryAdapter
is deprecated form of this one and it doesn't
implement newly added listener interfaces.MapListener
Constructor and Description |
---|
MapListenerAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
entryAdded(EntryEvent<K,V> event)
Invoked upon addition of an entry.
|
void |
entryEvicted(EntryEvent<K,V> event)
Invoked upon eviction of an entry.
|
void |
entryExpired(EntryEvent<K,V> event)
Invoked upon expiration of an entry.
|
void |
entryLoaded(EntryEvent<K,V> event)
Invoked upon load of an entry.
|
void |
entryMerged(EntryEvent<K,V> event)
Invoked after WAN replicated entry is merged.
|
void |
entryRemoved(EntryEvent<K,V> event)
Invoked upon removal of an entry.
|
void |
entryUpdated(EntryEvent<K,V> event)
Invoked upon update of an entry.
|
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() . |
void |
onEntryEvent(EntryEvent<K,V> event)
This method is called when an one of the methods of the
EntryListener is not
overridden. |
void |
onMapEvent(MapEvent event)
This method is called when an one of the methods of the
EntryListener is not
overridden. |
public void entryAdded(EntryEvent<K,V> event)
EntryAddedListener
entryAdded
in interface EntryAddedListener<K,V>
event
- the event invoked when an entry is addedpublic void entryRemoved(EntryEvent<K,V> event)
EntryRemovedListener
entryRemoved
in interface EntryRemovedListener<K,V>
event
- the event invoked when an entry is removedpublic void entryUpdated(EntryEvent<K,V> event)
EntryUpdatedListener
entryUpdated
in interface EntryUpdatedListener<K,V>
event
- the event invoked when an entry is updatedpublic void entryEvicted(EntryEvent<K,V> event)
EntryEvictedListener
entryEvicted
in interface EntryEvictedListener<K,V>
event
- the event invoked when an entry is evictedpublic void entryExpired(EntryEvent<K,V> event)
EntryExpiredListener
entryExpired
in interface EntryExpiredListener<K,V>
event
- the event invoked when an entry is expired.public void entryMerged(EntryEvent<K,V> event)
EntryMergedListener
entryMerged
in interface EntryMergedListener<K,V>
event
- the event invoked when an entry is mergedpublic void entryLoaded(EntryEvent<K,V> event)
EntryLoadedListener
entryLoaded
in interface EntryLoadedListener<K,V>
event
- the event invoked when an entry is loadedpublic void mapEvicted(MapEvent event)
MapEvictedListener
IMap.evictAll()
.mapEvicted
in interface MapEvictedListener
event
- the map event invoked when all entries are evicted by IMap.evictAll()
public void mapCleared(MapEvent event)
MapClearedListener
IMap.clear()
.
When a listener is registered as local-only then it will be invoked if and only if
the clear()
method is called on the same instance where the listener
was registered to.mapCleared
in interface MapClearedListener
event
- the map event invoked when all entries are removed by IMap.clear()
public void onEntryEvent(EntryEvent<K,V> event)
EntryListener
is not
overridden. It can be practical if you want to bundle some/all of the methods to a single method.event
- the EntryEvent.public void onMapEvent(MapEvent event)
EntryListener
is not
overridden. It can be practical if you want to bundle some/all of the methods to a single method.event
- the MapEvent.Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.