public class CounterUpdate extends Object implements DatatypeUpdate
When building a UpdateCounter
or UpdateMap
command
this class is used to encapsulate the update to be performed on a
Riak counter datatype.
Constructor and Description |
---|
CounterUpdate()
Constructs a CounterUpdate with a delta of 0 (zero).
|
CounterUpdate(long delta)
Constructs a CounterUpdate with the supplied delta.
|
Modifier and Type | Method and Description |
---|---|
long |
getDelta()
Get the delta.
|
CounterOp |
getOp()
Returns the core update.
|
public CounterUpdate()
public CounterUpdate(long delta)
To decrease a counter supply a negative value.
delta
- the value to add to the counter in Riak.public long getDelta()
public CounterOp getOp()
getOp
in interface DatatypeUpdate
Copyright © 2016. All rights reserved.