| Modifier and Type | Method and Description |
|---|---|
Object |
apply(RaftGroupId groupId,
String name,
Data function,
int returnValueType,
boolean alter)
Applies a function on the value
|
Object |
compareAndSet(RaftGroupId groupId,
String name,
Data oldValue,
Data newValue)
Alters the currently stored value by applying a function on it.
|
Object |
contains(RaftGroupId groupId,
String name,
Data value)
Checks if the reference contains the value.
|
Object |
get(RaftGroupId groupId,
String name)
Gets the current value.
|
Object |
set(RaftGroupId groupId,
String name,
Data newValue,
boolean returnOldValue)
Atomically sets the given value
|
Object apply(RaftGroupId groupId, String name, Data function, int returnValueType, boolean alter)
groupId - CP group id of this IAtomicReference instance.name - The name of this IAtomicReference instance.function - The function applied to the value.returnValueType - 0 returns no value, 1 returns the old value,
2 returns the new valuealter - Denotes whether result of the function will be
set to the IAtomicRefInstanceObject compareAndSet(RaftGroupId groupId, String name, @Nullable Data oldValue, @Nullable Data newValue)
groupId - CP group id of this IAtomicReference instance.name - Name of this IAtomicReference instance.oldValue - The expected valuenewValue - The new valueObject contains(RaftGroupId groupId, String name, @Nullable Data value)
groupId - CP group id of this IAtomicReference instance.name - Name of this IAtomicReference instance.value - The value to check (is allowed to be null).Object get(RaftGroupId groupId, String name)
groupId - CP group id of this IAtomicReference instance.name - Name of this IAtomicReference instance.Object set(RaftGroupId groupId, String name, @Nullable Data newValue, boolean returnOldValue)
groupId - CP group id of this IAtomicReference instance.name - Name of this IAtomicReference instance.newValue - The value to setreturnOldValue - Denotes whether the old value is returned or notreturnOldValue parameterCopyright © 2019. All Rights Reserved.