K - key typeV - value typepublic class MapEvent<K,V> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MapEvent.Type
MapEvent type.
|
| Constructor and Description |
|---|
MapEvent(MapEvent.Type type,
String name,
K key,
Versioned<V> currentValue,
Versioned<V> previousValue)
Creates a new event object.
|
MapEvent(String name,
K key,
Versioned<V> currentValue,
Versioned<V> previousValue)
Creates a new event object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
K |
key()
Returns the key this event concerns.
|
String |
name()
Returns the map name.
|
Versioned<V> |
newValue()
Returns the new value in the map associated with the key.
|
Versioned<V> |
oldValue()
Returns the value associated with the key, before it was updated.
|
String |
toString() |
MapEvent.Type |
type()
Returns the type of the event.
|
Versioned<V> |
value()
Deprecated.
1.5.0 Falcon release. Use
newValue() or oldValue() instead. |
public MapEvent(String name, K key, Versioned<V> currentValue, Versioned<V> previousValue)
name - map namekey - key the event concernscurrentValue - new value key is mapped topreviousValue - value that was replacedpublic MapEvent(MapEvent.Type type, String name, K key, Versioned<V> currentValue, Versioned<V> previousValue)
type - event typename - map namekey - key the event concernscurrentValue - new value key is mapped topreviousValue - value that was replacedpublic String name()
public MapEvent.Type type()
public K key()
@Deprecated public Versioned<V> value()
newValue() or oldValue() instead.public Versioned<V> newValue()
type() returns REMOVE,
this method will return null.public Versioned<V> oldValue()