public class PNCounterProxy extends AbstractDistributedObject<PNCounterService> implements PNCounter
PNCounter
.PARTITIONING_STRATEGY
Modifier and Type | Method and Description |
---|---|
long |
addAndGet(long delta)
Adds the given value to the current value.
|
long |
decrementAndGet()
Decrements by one the current value.
|
long |
get()
Returns the current value of the counter.
|
long |
getAndAdd(long delta)
Adds the given value to the current value.
|
long |
getAndDecrement()
Decrements by one the current value.
|
long |
getAndIncrement()
Increments by one the current value.
|
long |
getAndSubtract(long delta)
Subtracts the given value from the current value.
|
Address |
getCurrentTargetReplicaAddress()
Returns the current target replica address to which this proxy is
sending invocations.
|
String |
getName()
Returns the unique name for this DistributedObject.
|
String |
getServiceName()
Returns the service name for this object.
|
long |
incrementAndGet()
Increments by one the current value.
|
void |
reset()
Resets the observed state by this PN counter.
|
void |
setOperationTryCount(int operationTryCount)
Sets the operation retry count for PN counter operations.
|
long |
subtractAndGet(long delta)
Subtracts the given value from the current value.
|
String |
toString() |
destroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, isClusterVersionEqualTo, isClusterVersionGreaterOrEqual, isClusterVersionGreaterThan, isClusterVersionLessOrEqual, isClusterVersionLessThan, isClusterVersionUnknown, isClusterVersionUnknownOrGreaterOrEqual, isClusterVersionUnknownOrGreaterThan, isClusterVersionUnknownOrLessOrEqual, isClusterVersionUnknownOrLessThan, postDestroy, preDestroy, throwNotActiveException, toData
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
destroy, getPartitionKey
public String getName()
DistributedObject
DistributedObjectUtil.getName(DistributedObject)
because this might be also a PrefixedDistributedObject
.getName
in interface DistributedObject
public String getServiceName()
DistributedObject
getServiceName
in interface DistributedObject
getServiceName
in class AbstractDistributedObject<PNCounterService>
public long get()
PNCounter
get
in interface PNCounter
Cluster.getClusterVersion()
public long getAndAdd(long delta)
PNCounter
getAndAdd
in interface PNCounter
delta
- the value to addCluster.getClusterVersion()
public long addAndGet(long delta)
PNCounter
addAndGet
in interface PNCounter
delta
- the value to addCluster.getClusterVersion()
public long getAndSubtract(long delta)
PNCounter
getAndSubtract
in interface PNCounter
delta
- the value to addCluster.getClusterVersion()
public long subtractAndGet(long delta)
PNCounter
subtractAndGet
in interface PNCounter
delta
- the value to subtractCluster.getClusterVersion()
public long decrementAndGet()
PNCounter
decrementAndGet
in interface PNCounter
Cluster.getClusterVersion()
public long incrementAndGet()
PNCounter
incrementAndGet
in interface PNCounter
Cluster.getClusterVersion()
public long getAndDecrement()
PNCounter
getAndDecrement
in interface PNCounter
Cluster.getClusterVersion()
public long getAndIncrement()
PNCounter
getAndIncrement
in interface PNCounter
Cluster.getClusterVersion()
public void reset()
PNCounter
ConsistencyLostException
to reset the proxy and to be able to start a new session.public Address getCurrentTargetReplicaAddress()
public void setOperationTryCount(int operationTryCount)
public String toString()
toString
in class AbstractDistributedObject<PNCounterService>
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.