T
- public abstract static class UpdateValue.Update<T> extends Object
Constructor and Description |
---|
UpdateValue.Update() |
Modifier and Type | Method and Description |
---|---|
abstract T |
apply(T original)
Modify the input value and return the modification.
|
static <T> UpdateValue.Update<T> |
clobberUpdate(T newValue)
Returns an Update that replaces whatever is in Riak.
|
boolean |
isModified()
true if this Update has modified the input value and requires a store,
defaults to
true |
static <T> UpdateValue.Update<T> |
noopUpdate()
Returns a no-op Update instance.
|
protected void |
setModified(boolean modified)
Set the modification status of this update, defaults to
true |
public abstract T apply(T original)
original
- the resolved valueprotected void setModified(boolean modified)
true
modified
- true if modifiedpublic boolean isModified()
true
public static <T> UpdateValue.Update<T> noopUpdate()
This can be used to simply resolve siblings that exist in Riak without modifying the resolved object.
Update
instance the does not modify anything.public static <T> UpdateValue.Update<T> clobberUpdate(T newValue)
This Update simply returns the supplied value, thus replacing anything currently in Riak with that value.
newValue
- the obj to store in Riak.Copyright © 2014. All rights reserved.