public class ClientPNCounterProxy extends ClientProxy implements PNCounter
PNCounter.name| Constructor and Description |
|---|
ClientPNCounterProxy(String serviceName,
String objectName,
ClientContext context)
Creates a client
PNCounter proxy |
| 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.
|
long |
incrementAndGet()
Increments by one the current value.
|
void |
reset()
Resets the observed state by this PN counter.
|
long |
subtractAndGet(long delta)
Subtracts the given value from the current value.
|
String |
toString() |
deregisterListener, destroy, destroyLocally, destroyRemotely, equals, getClient, getConnectedServerVersion, getContext, getDistributedObjectName, getId, getName, getPartitionKey, getSerializationService, getServiceName, hashCode, invoke, invoke, invokeOnAddress, invokeOnPartition, invokeOnPartitionInterruptibly, onDestroy, onInitialize, onShutdown, postDestroy, preDestroy, registerListener, setContext, toData, toObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getName, getPartitionKey, getServiceNamepublic ClientPNCounterProxy(String serviceName, String objectName, ClientContext context)
PNCounter proxyserviceName - the service nameobjectName - the PNCounter namecontext - the client context containing references to services
and configurationpublic 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()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.