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 class
NodeUpdate.Builder<V>
NodeUpdate builder.static class
NodeUpdate.Type
Type 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 boolean
equals(Object object)
int
hashCode()
<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.DocumentPath
path()
Returns the item path being updated.String
toString()
NodeUpdate.Type
type()
Returns the type of update operation.V
value()
Returns the new value.long
version()
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.
-
-