public class AtomicNumberClientProxy extends Object implements AtomicNumber
Instance.InstanceType| Constructor and Description |
|---|
AtomicNumberClientProxy(HazelcastClient hazelcastClient,
String name) |
| Modifier and Type | Method and Description |
|---|---|
long |
addAndGet(long delta)
Atomically adds the given value to the current value.
|
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.
|
void |
destroy()
Destroys this instance cluster-wide.
|
long |
get()
Gets the current value.
|
long |
getAndAdd(long delta)
Atomically adds the given value to the current value.
|
long |
getAndSet(long newValue)
Atomically sets the given value and returns the old value.
|
Object |
getId()
Returns the unique id for this instance.
|
Instance.InstanceType |
getInstanceType()
Returns instance type such as map, set, list, lock, topic, multimap, id generator
|
LocalAtomicNumberStats |
getLocalAtomicNumberStats() |
String |
getName()
Returns the name of this IAtomicLong instance.
|
long |
incrementAndGet()
Atomically increments the current value by one.
|
void |
lazySet(long newValue)
Deprecated.
|
void |
set(long newValue)
Atomically sets the given value.
|
boolean |
weakCompareAndSet(long expect,
long update)
Deprecated.
|
public AtomicNumberClientProxy(HazelcastClient hazelcastClient, String name)
public long addAndGet(long delta)
AtomicNumberaddAndGet in interface AtomicNumberdelta - the value to addpublic boolean compareAndSet(long expect,
long update)
AtomicNumber== the expected value.compareAndSet in interface AtomicNumberexpect - the expected valueupdate - the new valuepublic long decrementAndGet()
AtomicNumberdecrementAndGet in interface AtomicNumberpublic long get()
AtomicNumberget in interface AtomicNumberpublic long getAndAdd(long delta)
AtomicNumbergetAndAdd in interface AtomicNumberdelta - the value to addpublic long getAndSet(long newValue)
AtomicNumbergetAndSet in interface AtomicNumbernewValue - the new valuepublic long incrementAndGet()
AtomicNumberincrementAndGet in interface AtomicNumberpublic void set(long newValue)
AtomicNumberset in interface AtomicNumbernewValue - the new valuepublic void destroy()
Instancepublic Object getId()
Instancepublic Instance.InstanceType getInstanceType()
InstancegetInstanceType in interface Instancepublic String getName()
AtomicNumbergetName in interface AtomicNumber@Deprecated public boolean weakCompareAndSet(long expect, long update)
AtomicNumberweakCompareAndSet in interface AtomicNumber@Deprecated public void lazySet(long newValue)
lazySet in interface AtomicNumberpublic LocalAtomicNumberStats getLocalAtomicNumberStats()
getLocalAtomicNumberStats in interface AtomicNumberCopyright © 2013 Hazelcast, Inc.. All rights reserved.