Class MultimapEvent<K,​V>

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

    public class MultimapEvent<K,​V>
    extends Object
    Representation of a ConsistentMultimap update notification.
    • Constructor Detail

      • MultimapEvent

        public MultimapEvent​(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 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object