public class AtomicNumberProxyImpl extends FactoryAwareNamedProxy implements AtomicNumberProxy
factory, name
DATA_LONG_ZERO
Constructor and Description |
---|
AtomicNumberProxyImpl() |
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.
|
boolean |
equals(Object o) |
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 |
getLongName() |
String |
getName()
Returns the name of this IAtomicLong instance.
|
AtomicNumberOperationsCounter |
getOperationsCounter() |
int |
hashCode() |
long |
incrementAndGet()
Atomically increments the current value by one.
|
void |
lazySet(long newValue)
Deprecated.
|
void |
set(long newValue)
Atomically sets the given value.
|
String |
toString() |
boolean |
weakCompareAndSet(long expect,
long update)
Deprecated.
|
getFactory, readData, setHazelcastInstance, setName, writeData
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
setHazelcastInstance
public void destroy()
Instance
public Instance.InstanceType getInstanceType()
Instance
getInstanceType
in interface Instance
public Object getId()
Instance
public String getName()
AtomicNumber
getName
in interface AtomicNumber
getName
in class FactoryAwareNamedProxy
public String getLongName()
getLongName
in interface AtomicNumberProxy
public long addAndGet(long delta)
AtomicNumber
addAndGet
in interface AtomicNumber
delta
- the value to addpublic boolean compareAndSet(long expect, long update)
AtomicNumber
==
the expected value.compareAndSet
in interface AtomicNumber
expect
- the expected valueupdate
- the new valuepublic long decrementAndGet()
AtomicNumber
decrementAndGet
in interface AtomicNumber
public long get()
AtomicNumber
get
in interface AtomicNumber
public long getAndAdd(long delta)
AtomicNumber
getAndAdd
in interface AtomicNumber
delta
- the value to addpublic long getAndSet(long newValue)
AtomicNumber
getAndSet
in interface AtomicNumber
newValue
- the new valuepublic long incrementAndGet()
AtomicNumber
incrementAndGet
in interface AtomicNumber
public void set(long newValue)
AtomicNumber
set
in interface AtomicNumber
newValue
- the new valuepublic AtomicNumberOperationsCounter getOperationsCounter()
getOperationsCounter
in interface AtomicNumberProxy
public LocalAtomicNumberStats getLocalAtomicNumberStats()
getLocalAtomicNumberStats
in interface AtomicNumber
@Deprecated public void lazySet(long newValue)
lazySet
in interface AtomicNumber
@Deprecated public boolean weakCompareAndSet(long expect, long update)
AtomicNumber
weakCompareAndSet
in interface AtomicNumber
Copyright © 2013 Hazelcast, Inc.. All rights reserved.