|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.client.spi.ClientProxy com.hazelcast.client.proxy.ClientAtomicLongProxy
public class ClientAtomicLongProxy
Constructor Summary | |
---|---|
ClientAtomicLongProxy(String serviceName,
String objectId)
|
Method Summary | ||
---|---|---|
long |
addAndGet(long delta)
Atomically adds the given value to the current value. |
|
void |
alter(IFunction<Long,Long> function)
Alters the currently stored value by applying a function on it. |
|
long |
alterAndGet(IFunction<Long,Long> function)
Alters the currently stored value by applying a function on it and gets the result. |
|
|
apply(IFunction<Long,R> function)
Applies a function on the value, the actual stored value will not change. |
|
boolean |
compareAndSet(long expect,
long update)
Atomically sets the value to the given updated value only if the current value == the expected value. |
|
long |
decrementAndGet()
Atomically decrements the current value by one. |
|
long |
get()
Gets the current value. |
|
long |
getAndAdd(long delta)
Atomically adds the given value to the current value. |
|
long |
getAndAlter(IFunction<Long,Long> function)
Alters the currently stored value by applying a function on it on and gets the old value. |
|
long |
getAndIncrement()
Atomically increments the current value by one. |
|
long |
getAndSet(long newValue)
Atomically sets the given value and returns the old value. |
|
long |
incrementAndGet()
Atomically increments the current value by one. |
|
protected
|
invoke(ClientRequest req)
|
|
void |
set(long newValue)
Atomically sets the given value. |
|
String |
toString()
|
Methods inherited from class com.hazelcast.client.spi.ClientProxy |
---|
destroy, equals, getContext, getId, getName, getPartitionKey, getServiceName, hashCode, invoke, invoke, invokeInterruptibly, listen, listen, onDestroy, onInitialize, onShutdown, setContext, stopListening, throwExceptionIfNull, toData, toObject |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.hazelcast.core.IAtomicLong |
---|
getName |
Methods inherited from interface com.hazelcast.core.DistributedObject |
---|
destroy, getId, getPartitionKey, getServiceName |
Constructor Detail |
---|
public ClientAtomicLongProxy(String serviceName, String objectId)
Method Detail |
---|
public <R> R apply(IFunction<Long,R> function)
IAtomicLong
apply
in interface IAtomicLong
function
- the function applied to the value, the value is not changed
public void alter(IFunction<Long,Long> function)
IAtomicLong
alter
in interface IAtomicLong
function
- the function applied to the currently stored valuepublic long alterAndGet(IFunction<Long,Long> function)
IAtomicLong
alterAndGet
in interface IAtomicLong
function
- the function applied to the currently stored value
public long getAndAlter(IFunction<Long,Long> function)
IAtomicLong
getAndAlter
in interface IAtomicLong
function
- the function applied to the currently stored value
public long addAndGet(long delta)
IAtomicLong
addAndGet
in interface IAtomicLong
delta
- the value to add to the current value
public boolean compareAndSet(long expect, long update)
IAtomicLong
==
the expected value.
compareAndSet
in interface IAtomicLong
expect
- the expected valueupdate
- the new value
public long decrementAndGet()
IAtomicLong
decrementAndGet
in interface IAtomicLong
public long get()
IAtomicLong
get
in interface IAtomicLong
public long getAndAdd(long delta)
IAtomicLong
getAndAdd
in interface IAtomicLong
delta
- the value to add to the current value
public long getAndSet(long newValue)
IAtomicLong
getAndSet
in interface IAtomicLong
newValue
- the new value
public long incrementAndGet()
IAtomicLong
incrementAndGet
in interface IAtomicLong
public long getAndIncrement()
IAtomicLong
getAndIncrement
in interface IAtomicLong
public void set(long newValue)
IAtomicLong
set
in interface IAtomicLong
newValue
- the new valueprotected <T> T invoke(ClientRequest req)
invoke
in class ClientProxy
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |