public interface PNCounterGeneratorCodecTemplate
| Modifier and Type | Method and Description |
|---|---|
Object |
add(String name,
long delta,
boolean getBeforeUpdate,
List<Map.Entry<String,Long>> replicaTimestamps,
Address targetReplica)
Adds a delta to the PNCounter value.
|
Object |
get(String name,
List<Map.Entry<String,Long>> replicaTimestamps,
Address targetReplica)
Query operation to retrieve the current value of the PNCounter.
|
Object |
getConfiguredReplicaCount(String name)
Returns the configured number of CRDT replicas for the PN counter with
the given
name. |
@Since(value="1.6") Object get(String name, List<Map.Entry<String,Long>> replicaTimestamps, Address targetReplica)
The invocation will return the replica timestamps (vector clock) which
can then be sent with the next invocation to keep session consistency
guarantees.
The target replica is determined by the targetReplica parameter.
If smart routing is disabled, the actual member processing the client
message may act as a proxy.
name - the name of the PNCounterreplicaTimestamps - last observed replica timestamps (vector clock)targetReplica - the target replica@Since(value="1.6") Object add(String name, long delta, boolean getBeforeUpdate, List<Map.Entry<String,Long>> replicaTimestamps, Address targetReplica)
The invocation will return the replica timestamps (vector clock) which
can then be sent with the next invocation to keep session consistency
guarantees.
The target replica is determined by the targetReplica parameter.
If smart routing is disabled, the actual member processing the client
message may act as a proxy.
name - the name of the PNCounterdelta - the delta to add to the counter value, can be negativegetBeforeUpdate - true if the operation should return the
counter value before the addition, false
if it should return the value after the additionreplicaTimestamps - last observed replica timestamps (vector clock)targetReplica - the target replicagetBeforeUpdate is
true, otherwise the value after the update@Since(value="1.6") Object getConfiguredReplicaCount(String name)
name.
The actual replica count may be less, depending on the number of data
members in the cluster (members that own data).name - the name of the PNCounterCopyright © 2019. All Rights Reserved.