| Modifier and Type | Method and Description |
|---|---|
Object |
addAndGet(RaftGroupId groupId,
String name,
long delta)
Atomically adds the given value to the current value.
|
void |
alter(RaftGroupId groupId,
String name,
Data function,
int returnValueType)
Alters the currently stored value by applying a function on it.
|
Object |
apply(RaftGroupId groupId,
String name,
Data function)
Applies a function on the value, the actual stored value will not change
|
Object |
compareAndSet(RaftGroupId groupId,
String name,
long expected,
long updated)
Atomically sets the value to the given updated value only if the current
value the expected value.
|
Object |
get(RaftGroupId groupId,
String name)
Gets the current value.
|
Object |
getAndAdd(RaftGroupId groupId,
String name,
long delta)
Atomically adds the given value to the current value.
|
Object |
getAndSet(RaftGroupId groupId,
String name,
long newValue)
Atomically sets the given value and returns the old value.
|
Object apply(RaftGroupId groupId, String name, Data function)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.function - The function applied to the value and the value is not
changed.void alter(RaftGroupId groupId, String name, Data function, int returnValueType)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.function - The function applied to the currently stored value.returnValueType - 0 returns the old value, 1 returns the new valueObject addAndGet(RaftGroupId groupId, String name, long delta)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.delta - The value to add to the current valueObject compareAndSet(RaftGroupId groupId, String name, long expected, long updated)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.expected - The expected valueupdated - The new valueObject get(RaftGroupId groupId, String name)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.Object getAndAdd(RaftGroupId groupId, String name, long delta)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.delta - The value to add to the current valueObject getAndSet(RaftGroupId groupId, String name, long newValue)
groupId - CP group id of this IAtomicLong instance.name - Name of this IAtomicLong instance.newValue - The new valueCopyright © 2019. All Rights Reserved.