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 classMultimapEvent.TypeMultimapEvent 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 booleanequals(Object o)inthashCode()Kkey()Returns the key this event concerns.Stringname()Returns the map name.VnewValue()Returns the new value in the map associated with the key.VoldValue()Returns the old value that was associated with the key.StringtoString()MultimapEvent.Typetype()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
-
-