|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAtomicLong
IAtomicLong is a redundant and highly available distributed alternative to the
java.util.concurrent.atomic.AtomicLong
.
IAtomicReference
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. |
|
String |
getName()
Returns the name of this IAtomicLong instance. |
|
long |
incrementAndGet()
Atomically increments the current value by one. |
|
void |
set(long newValue)
Atomically sets the given value. |
Methods inherited from interface com.hazelcast.core.DistributedObject |
---|
destroy, getId, getPartitionKey, getServiceName |
Method Detail |
---|
String getName()
getName
in interface DistributedObject
long addAndGet(long delta)
delta
- the value to add to the current value
boolean compareAndSet(long expect, long update)
==
the expected value.
expect
- the expected valueupdate
- the new value
long decrementAndGet()
long get()
long getAndAdd(long delta)
delta
- the value to add to the current value
long getAndSet(long newValue)
newValue
- the new value
long incrementAndGet()
long getAndIncrement()
void set(long newValue)
newValue
- the new valuevoid alter(IFunction<Long,Long> function)
function
- the function applied to the currently stored value
IllegalArgumentException
- if function is null.long alterAndGet(IFunction<Long,Long> function)
function
- the function applied to the currently stored value
IllegalArgumentException
- if function is null.long getAndAlter(IFunction<Long,Long> function)
function
- the function applied to the currently stored value
IllegalArgumentException
- if function is null.<R> R apply(IFunction<Long,R> function)
function
- the function applied to the value, the value is not changed
IllegalArgumentException
- if function is null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |