Package org.onosproject.store.primitives
Class NodeUpdate<V>
- java.lang.Object
-
- org.onosproject.store.primitives.NodeUpdate<V>
-
- Type Parameters:
V- map value type
public final class NodeUpdate<V> extends Object
DocumentTree node update operation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classNodeUpdate.Builder<V>NodeUpdate builder.static classNodeUpdate.TypeType of database update operation.
-
Constructor Summary
Constructors Constructor Description NodeUpdate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)inthashCode()<T> NodeUpdate<T>map(Function<V,T> valueMapper)Transforms this instance into an instance of different parameterized types.static <V> NodeUpdate.Builder<V>newBuilder()Creates a new builder instance.DocumentPathpath()Returns the item path being updated.StringtoString()NodeUpdate.Typetype()Returns the type of update operation.Vvalue()Returns the new value.longversion()Returns the expected current version in the database for the key.
-
-
-
Method Detail
-
type
public NodeUpdate.Type type()
Returns the type of update operation.- Returns:
- type of update.
-
path
public DocumentPath path()
Returns the item path being updated.- Returns:
- item path
-
value
public V value()
Returns the new value.- Returns:
- item's target value.
-
version
public long version()
Returns the expected current version in the database for the key.- Returns:
- expected version.
-
map
public <T> NodeUpdate<T> map(Function<V,T> valueMapper)
Transforms this instance into an instance of different parameterized types.- Type Parameters:
T- value type of returned instance- Parameters:
valueMapper- transcoder to value type- Returns:
- new instance
-
newBuilder
public static <V> NodeUpdate.Builder<V> newBuilder()
Creates a new builder instance.- Type Parameters:
V- value type- Returns:
- builder.
-
-