Package org.onosproject.store.service
Class MultimapEvent<K,V>
- java.lang.Object
-
- org.onosproject.store.service.MultimapEvent<K,V>
-
- Type Parameters:
K
- key typeV
- value type
public class MultimapEvent<K,V> extends 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(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(Object o)
int
hashCode()
K
key()
Returns the key this event concerns.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.String
toString()
MultimapEvent.Type
type()
Returns the type of the event.
-
-
-
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. Iftype()
returnsREMOVE
, this method will returnnull
.- Returns:
- the new value for key
-
oldValue
public V oldValue()
Returns the old value that was associated with the key. Iftype()
returnsINSERT
, this method will returnnull
.- Returns:
- the old value that was mapped to the key
-
-