public class AtomicLongProxy extends AbstractDistributedObject<AtomicLongService> implements AsyncAtomicLong
PARTITIONING_STRATEGY| Constructor and Description |
|---|
AtomicLongProxy(String name,
NodeEngine nodeEngine,
AtomicLongService service) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
<R> R |
apply(IFunction<Long,R> function)
Applies a function on the value, the actual stored value will not change.
|
InternalCompletableFuture<Long> |
asyncAddAndGet(long delta) |
InternalCompletableFuture<Void> |
asyncAlter(IFunction<Long,Long> function) |
InternalCompletableFuture<Long> |
asyncAlterAndGet(IFunction<Long,Long> function) |
<R> InternalCompletableFuture<R> |
asyncApply(IFunction<Long,R> function) |
InternalCompletableFuture<Boolean> |
asyncCompareAndSet(long expect,
long update) |
InternalCompletableFuture<Long> |
asyncDecrementAndGet() |
InternalCompletableFuture<Long> |
asyncGet() |
InternalCompletableFuture<Long> |
asyncGetAndAdd(long delta) |
InternalCompletableFuture<Long> |
asyncGetAndAlter(IFunction<Long,Long> function) |
InternalCompletableFuture<Long> |
asyncGetAndIncrement() |
InternalCompletableFuture<Long> |
asyncGetAndSet(long newValue) |
InternalCompletableFuture<Long> |
asyncIncrementAndGet() |
InternalCompletableFuture<Void> |
asyncSet(long newValue) |
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.
|
String |
getName()
Returns the name of this IAtomicLong instance.
|
int |
getPartitionId() |
String |
getServiceName()
Returns the service name for this object.
|
long |
incrementAndGet()
Atomically increments the current value by one.
|
void |
set(long newValue)
Atomically sets the given value.
|
String |
toString() |
destroy, equals, getId, getNameAsPartitionAwareData, getNodeEngine, getPartitionKey, getService, hashCode, invalidate, postDestroy, throwNotActiveExceptionclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getId, getPartitionKeypublic AtomicLongProxy(String name, NodeEngine nodeEngine, AtomicLongService service)
public String getName()
IAtomicLonggetName in interface DistributedObjectgetName in interface IAtomicLongpublic int getPartitionId()
public String getServiceName()
DistributedObjectgetServiceName in interface DistributedObjectgetServiceName in class AbstractDistributedObject<AtomicLongService>public long addAndGet(long delta)
IAtomicLongaddAndGet in interface IAtomicLongdelta - the value to addpublic InternalCompletableFuture<Long> asyncAddAndGet(long delta)
asyncAddAndGet in interface AsyncAtomicLongpublic boolean compareAndSet(long expect,
long update)
IAtomicLong== the expected value.compareAndSet in interface IAtomicLongexpect - the expected valueupdate - the new valuepublic InternalCompletableFuture<Boolean> asyncCompareAndSet(long expect, long update)
asyncCompareAndSet in interface AsyncAtomicLongpublic void set(long newValue)
IAtomicLongset in interface IAtomicLongnewValue - the new valuepublic InternalCompletableFuture<Void> asyncSet(long newValue)
asyncSet in interface AsyncAtomicLongpublic long getAndSet(long newValue)
IAtomicLonggetAndSet in interface IAtomicLongnewValue - the new valuepublic InternalCompletableFuture<Long> asyncGetAndSet(long newValue)
asyncGetAndSet in interface AsyncAtomicLongpublic long getAndAdd(long delta)
IAtomicLonggetAndAdd in interface IAtomicLongdelta - the value to addpublic InternalCompletableFuture<Long> asyncGetAndAdd(long delta)
asyncGetAndAdd in interface AsyncAtomicLongpublic long decrementAndGet()
IAtomicLongdecrementAndGet in interface IAtomicLongpublic InternalCompletableFuture<Long> asyncDecrementAndGet()
asyncDecrementAndGet in interface AsyncAtomicLongpublic long get()
IAtomicLongget in interface IAtomicLongpublic InternalCompletableFuture<Long> asyncGet()
asyncGet in interface AsyncAtomicLongpublic long incrementAndGet()
IAtomicLongincrementAndGet in interface IAtomicLongpublic InternalCompletableFuture<Long> asyncIncrementAndGet()
asyncIncrementAndGet in interface AsyncAtomicLongpublic long getAndIncrement()
IAtomicLonggetAndIncrement in interface IAtomicLongpublic InternalCompletableFuture<Long> asyncGetAndIncrement()
asyncGetAndIncrement in interface AsyncAtomicLongpublic void alter(IFunction<Long,Long> function)
IAtomicLongalter in interface IAtomicLongfunction - the functionpublic InternalCompletableFuture<Void> asyncAlter(IFunction<Long,Long> function)
asyncAlter in interface AsyncAtomicLongpublic long alterAndGet(IFunction<Long,Long> function)
IAtomicLongalterAndGet in interface IAtomicLongfunction - the functionpublic InternalCompletableFuture<Long> asyncAlterAndGet(IFunction<Long,Long> function)
asyncAlterAndGet in interface AsyncAtomicLongpublic long getAndAlter(IFunction<Long,Long> function)
IAtomicLonggetAndAlter in interface IAtomicLongfunction - the functionpublic InternalCompletableFuture<Long> asyncGetAndAlter(IFunction<Long,Long> function)
asyncGetAndAlter in interface AsyncAtomicLongpublic <R> R apply(IFunction<Long,R> function)
IAtomicLongapply in interface IAtomicLongfunction - the functionpublic <R> InternalCompletableFuture<R> asyncApply(IFunction<Long,R> function)
asyncApply in interface AsyncAtomicLongpublic String toString()
toString in class AbstractDistributedObject<AtomicLongService>Copyright © 2014 Hazelcast, Inc.. All Rights Reserved.