Class SeppukuMapListener

java.lang.Object
com.tangosol.util.Base
com.tangosol.net.cache.SeppukuMapListener
All Implemented Interfaces:
MapListener, EventListener

public class SeppukuMapListener extends Base implements MapListener
A map listener that follows the "seppuku" pattern, invalidating the Map entries when MapEvents for another related ObservableMap are delivered.
Author:
gg 2002.09.10
See Also:
  • Constructor Details

    • SeppukuMapListener

      public SeppukuMapListener(Map map)
      Construct a SeppukuMapListener for the specified front map.
      Parameters:
      map - the Map object to modify based on events issued to this Listener from a different ObservableMap object
  • Method Details

    • getMap

      public Map getMap()
      Returns the front Map invalidated by this listener.
      Returns:
      the front Map invalidated by this listener
    • entryInserted

      public void entryInserted(MapEvent evt)
      Invoked when a map entry has been inserted.
      Specified by:
      entryInserted in interface MapListener
      Parameters:
      evt - the MapEvent
    • entryUpdated

      public void entryUpdated(MapEvent evt)
      Invoked when a map entry has been updated.
      Specified by:
      entryUpdated in interface MapListener
      Parameters:
      evt - the MapEvent
    • entryDeleted

      public void entryDeleted(MapEvent evt)
      Invoked when a map entry has been removed.
      Specified by:
      entryDeleted in interface MapListener
      Parameters:
      evt - the MapEvent
    • validate

      protected void validate(Object oKey, Object oValue)
      Validate the specified entry and remove it from the Map object affected by this listener if and only if the value is different (implying that the entry has been modified elsewhere).
      Parameters:
      oKey - the entry key
      oValue - the "new" entry value; this is potentially different from the one in the map maintained by this Suppuku listener