Interface LoomClient.MapChangeListener
- Enclosing class:
LoomClient
public static interface LoomClient.MapChangeListener
Listener interface for receiving entry events from the cache.
Implement this interface to receive notifications when entries in a distributed map are added, updated, or removed on the server.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonEntryAdded(String mapName, String key, @Nullable String value) Called when an entry is added to the map.default voidonEntryEvicted(String mapName, String key, @Nullable String value) Called when an entry is evicted by server-side capacity or memory pressure.default voidonEntryExpired(String mapName, String key, @Nullable String value) Called when an entry expires due to server-side TTL.default voidonEntryLoaded(String mapName, String key, @Nullable String value) Called when an entry is populated from a backing MapStore on a read-through miss.default voidonEntryMerged(String mapName, String key, @Nullable String oldValue, @Nullable String newValue) Called when an entry is reconciled by WAN merge conflict resolution.default voidonEntryRemoved(String mapName, String key, @Nullable String oldValue) Called when an entry is removed from the map.default voidonEntryUpdated(String mapName, String key, @Nullable String oldValue, @Nullable String newValue) Called when an entry is updated in the map.default voidonMapCleared(String mapName) Called when the server clears the entire map.
-
Method Details
-
onEntryAdded
-
onEntryLoaded
-
onEntryUpdated
-
onEntryRemoved
-
onEntryEvicted
-
onEntryExpired
-
onEntryMerged
default void onEntryMerged(String mapName, String key, @Nullable String oldValue, @Nullable String newValue) Called when an entry is reconciled by WAN merge conflict resolution.- Parameters:
mapName- the name of the mapkey- the key that was mergedoldValue- the previous local valuenewValue- the merged winning value
-
onMapCleared
Called when the server clears the entire map.- Parameters:
mapName- the name of the map
-