Class MultimapEvent<K,V>

Type Parameters:
K - key type
V - value type
All Implemented Interfaces:
Event<MultimapEvent.Type,K>

public class MultimapEvent<K,V> extends AbstractEvent<MultimapEvent.Type,K>
Representation of a ConsistentMultimap update notification.
  • Constructor Details

    • MultimapEvent

      public MultimapEvent(MultimapEvent.Type type, K key, V newValue, V oldValue)
      Creates a new event object.
      Parameters:
      type - the event type
      key - key the event concerns
      newValue - new value key is mapped to
      oldValue - previous value that was mapped to the key
  • Method Details

    • key

      public K key()
      Returns the key.
      Returns:
      the key
    • newValue

      public V newValue()
      Returns the new value in the map associated with the key. If AbstractEvent.type() returns REMOVE, this method will return null.
      Returns:
      the new value for key
    • oldValue

      public V oldValue()
      Returns the old value that was associated with the key. If AbstractEvent.type() returns INSERT, this method will return null.
      Returns:
      the old value that was mapped to the key
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class AbstractEvent<MultimapEvent.Type,K>