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 Details

    • onEntryAdded

      default void onEntryAdded(String mapName, String key, @Nullable String value)
      Called when an entry is added to the map.
      Parameters:
      mapName - the name of the map
      key - the key that was added
      value - the value that was added
    • onEntryLoaded

      default void onEntryLoaded(String mapName, String key, @Nullable String value)
      Called when an entry is populated from a backing MapStore on a read-through miss.
      Parameters:
      mapName - the name of the map
      key - the key that was loaded
      value - the loaded value
    • onEntryUpdated

      default void onEntryUpdated(String mapName, String key, @Nullable String oldValue, @Nullable String newValue)
      Called when an entry is updated in the map.
      Parameters:
      mapName - the name of the map
      key - the key that was updated
      oldValue - the previous value
      newValue - the new value
    • onEntryRemoved

      default void onEntryRemoved(String mapName, String key, @Nullable String oldValue)
      Called when an entry is removed from the map.
      Parameters:
      mapName - the name of the map
      key - the key that was removed
      oldValue - the removed value
    • onEntryEvicted

      default void onEntryEvicted(String mapName, String key, @Nullable String value)
      Called when an entry is evicted by server-side capacity or memory pressure.
      Parameters:
      mapName - the name of the map
      key - the key that was evicted
      value - the evicted value
    • onEntryExpired

      default void onEntryExpired(String mapName, String key, @Nullable String value)
      Called when an entry expires due to server-side TTL.
      Parameters:
      mapName - the name of the map
      key - the key that expired
      value - the expired value
    • 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 map
      key - the key that was merged
      oldValue - the previous local value
      newValue - the merged winning value
    • onMapCleared

      default void onMapCleared(String mapName)
      Called when the server clears the entire map.
      Parameters:
      mapName - the name of the map