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, toObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
destroy, getName, getPartitionKey, getServiceName
public 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()
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()
Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.