Class MultimapEvent<K,​V>

  • Type Parameters:
    K - key type
    V - value type

    public class MultimapEvent<K,​V>
    extends java.lang.Object
    Representation of a ConsistentMultimap update notification.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  MultimapEvent.Type
      MultimapEvent type.
    • Constructor Summary

      Constructors 
      Constructor Description
      MultimapEvent​(java.lang.String name, K key, V newValue, V oldValue)
      Creates a new event object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      K key()
      Returns the key this event concerns.
      java.lang.String name()
      Returns the map name.
      V newValue()
      Returns the new value in the map associated with the key.
      V oldValue()
      Returns the old value that was associated with the key.
      java.lang.String toString()  
      MultimapEvent.Type type()
      Returns the type of the event.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MultimapEvent

        public MultimapEvent​(java.lang.String name,
                             K key,
                             V newValue,
                             V oldValue)
        Creates a new event object.
        Parameters:
        name - map name
        key - key the event concerns
        newValue - new value key is mapped to
        oldValue - previous value that was mapped to the key
    • Method Detail

      • name

        public java.lang.String name()
        Returns the map name.
        Returns:
        name of map
      • type

        public MultimapEvent.Type type()
        Returns the type of the event.
        Returns:
        the type of event
      • key

        public K key()
        Returns the key this event concerns.
        Returns:
        the key
      • newValue

        public V newValue()
        Returns the new value in the map associated with the key. If 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 type() returns INSERT, this method will return null.
        Returns:
        the old value that was mapped to the key
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object