Package org.onosproject.store.service
Class EventuallyConsistentMapEvent<K,V>
- java.lang.Object
-
- org.onosproject.store.service.EventuallyConsistentMapEvent<K,V>
-
public final class EventuallyConsistentMapEvent<K,V> extends java.lang.Object
Representation of a EventuallyConsistentMap update notification.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EventuallyConsistentMapEvent.Type
-
Constructor Summary
Constructors Constructor Description EventuallyConsistentMapEvent(java.lang.String name, EventuallyConsistentMapEvent.Type type, K key, V value)
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.java.lang.String
toString()
EventuallyConsistentMapEvent.Type
type()
Returns the type of the event.V
value()
Returns the value associated with this event.
-
-
-
Constructor Detail
-
EventuallyConsistentMapEvent
public EventuallyConsistentMapEvent(java.lang.String name, EventuallyConsistentMapEvent.Type type, K key, V value)
Creates a new event object.- Parameters:
name
- map nametype
- the type of the eventkey
- the key the event concernsvalue
- the value mapped to the key
-
-
Method Detail
-
name
public java.lang.String name()
Returns the map name.- Returns:
- name of map
-
type
public EventuallyConsistentMapEvent.Type type()
Returns the type of the event.- Returns:
- the type of the event
-
key
public K key()
Returns the key this event concerns.- Returns:
- the key
-
value
public V value()
Returns the value associated with this event. If type is REMOVE, this is the value that was removed. If type is PUT, this is the new value.- Returns:
- the value
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-