V - result typepublic class UpdateResult<K,V> extends Object
Both old and new values are accessible along with a flag that indicates if the the value was updated. If flag is false, oldValue and newValue both point to the same unmodified value.
| Constructor and Description |
|---|
UpdateResult(boolean updated,
String mapName,
K key,
org.onosproject.store.service.Versioned<V> oldValue,
org.onosproject.store.service.Versioned<V> newValue) |
| Modifier and Type | Method and Description |
|---|---|
K |
key() |
<K1,V1> UpdateResult<K1,V1> |
map(Function<K,K1> keyTransform,
Function<V,V1> valueMapper) |
String |
mapName() |
org.onosproject.store.service.Versioned<V> |
newValue() |
org.onosproject.store.service.Versioned<V> |
oldValue() |
org.onosproject.store.service.MapEvent<K,V> |
toMapEvent() |
boolean |
updated() |
public boolean updated()
public String mapName()
public K key()
public org.onosproject.store.service.Versioned<V> oldValue()
public org.onosproject.store.service.Versioned<V> newValue()
public <K1,V1> UpdateResult<K1,V1> map(Function<K,K1> keyTransform, Function<V,V1> valueMapper)
Copyright © 2015. All rights reserved.