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, toDataclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getPartitionKeypublic String getName()
DistributedObjectDistributedObjectUtil.getName(DistributedObject)
because this might be also a PrefixedDistributedObject.getName in interface DistributedObjectpublic String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectgetServiceName in class AbstractDistributedObject<PNCounterService>public long get()
PNCounterget in interface PNCounterCluster.getClusterVersion()public long getAndAdd(long delta)
PNCountergetAndAdd in interface PNCounterdelta - the value to addCluster.getClusterVersion()public long addAndGet(long delta)
PNCounteraddAndGet in interface PNCounterdelta - the value to addCluster.getClusterVersion()public long getAndSubtract(long delta)
PNCountergetAndSubtract in interface PNCounterdelta - the value to addCluster.getClusterVersion()public long subtractAndGet(long delta)
PNCountersubtractAndGet in interface PNCounterdelta - the value to subtractCluster.getClusterVersion()public long decrementAndGet()
PNCounterdecrementAndGet in interface PNCounterCluster.getClusterVersion()public long incrementAndGet()
PNCounterincrementAndGet in interface PNCounterCluster.getClusterVersion()public long getAndDecrement()
PNCountergetAndDecrement in interface PNCounterCluster.getClusterVersion()public long getAndIncrement()
PNCountergetAndIncrement in interface PNCounterCluster.getClusterVersion()public void reset()
PNCounterConsistencyLostException
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 © 2020 Hazelcast, Inc.. All Rights Reserved.