public interface AtomicReferenceCodecTemplate
Modifier and Type | Method and Description |
---|---|
void |
alter(String name,
Data function)
Alters the currently stored reference by applying a function on it.
|
Object |
alterAndGet(String name,
Data function)
Alters the currently stored reference by applying a function on it and gets the result.
|
Object |
apply(String name,
Data function)
Applies a function on the value, the actual stored value will not change.
|
void |
clear(String name)
Clears the current stored reference.
|
Object |
compareAndSet(String name,
Data expected,
Data updated)
Atomically sets the value to the given updated value only if the current value the expected value.
|
Object |
contains(String name,
Data expected)
Checks if the reference contains the value.
|
Object |
get(String name)
Gets the current value.
|
Object |
getAndAlter(String name,
Data function)
Alters the currently stored reference by applying a function on it on and gets the old value.
|
Object |
getAndSet(String name,
Data newValue)
Gets the old value and sets the new value.
|
Object |
isNull(String name)
Checks if the stored reference is null.
|
void |
set(String name,
Data newValue)
Atomically sets the given value.
|
Object |
setAndGet(String name,
Data newValue)
Sets and gets the value.
|
Object apply(String name, Data function)
name
- Name of the AtomicReference distributed object instance.function
- the function applied on the value, the stored value does not changevoid alter(String name, Data function)
name
- Name of the AtomicReference distributed object instance.function
- the function that alters the currently stored referenceObject alterAndGet(String name, Data function)
name
- Name of the AtomicReference distributed object instance.function
- the function that alters the currently stored referenceObject getAndAlter(String name, Data function)
name
- Name of the AtomicReference distributed object instance.function
- the function that alters the currently stored referenceObject contains(String name, @Nullable Data expected)
name
- Name of the AtomicReference distributed object instance.expected
- the value to check (is allowed to be null).Object compareAndSet(String name, @Nullable Data expected, @Nullable Data updated)
name
- Name of the AtomicReference distributed object instance.expected
- the expected valueupdated
- the new valueObject get(String name)
name
- Name of the AtomicReference distributed object instance.void set(String name, @Nullable Data newValue)
name
- Name of the AtomicReference distributed object instance.newValue
- the new valuevoid clear(String name)
name
- Name of the AtomicReference distributed object instance.Object getAndSet(String name, @Nullable Data newValue)
name
- Name of the AtomicReference distributed object instance.newValue
- the new value.Object setAndGet(String name, @Nullable Data newValue)
name
- Name of the AtomicReference distributed object instance.newValue
- the new valueCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.