public interface AtomicLongCodecTemplate
Modifier and Type | Method and Description |
---|---|
Object |
addAndGet(String name,
long delta)
Atomically adds the given value to the current value.
|
void |
alter(String name,
Data function)
Alters the currently stored value by applying a function on it.
|
Object |
alterAndGet(String name,
Data function)
Alters the currently stored value 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.
|
Object |
compareAndSet(String name,
long expected,
long updated)
Atomically sets the value to the given updated value only if the current value the expected value.
|
Object |
decrementAndGet(String name)
Atomically decrements the current value by one.
|
Object |
get(String name)
Gets the current value.
|
Object |
getAndAdd(String name,
long delta)
Atomically adds the given value to the current value.
|
Object |
getAndAlter(String name,
Data function)
Alters the currently stored value by applying a function on it on and gets the old value.
|
Object |
getAndIncrement(String name)
Atomically increments the current value by one.
|
Object |
getAndSet(String name,
long newValue)
Atomically sets the given value and returns the old value.
|
Object |
incrementAndGet(String name)
Atomically increments the current value by one.
|
void |
set(String name,
long newValue)
Atomically sets the given value.
|
Object apply(String name, Data function)
name
- The name of this IAtomicLong instance.function
- The function applied to the value, the value is not changed.void alter(String name, Data function)
name
- The name of this IAtomicLong instance.function
- The function applied to the currently stored value.Object alterAndGet(String name, Data function)
name
- The name of this IAtomicLong instance.function
- The function applied to the currently stored value.Object getAndAlter(String name, Data function)
name
- The name of this IAtomicLong instance.function
- The function applied to the currently stored value.Object addAndGet(String name, long delta)
name
- The name of this IAtomicLong instance.delta
- the value to add to the current valueObject compareAndSet(String name, long expected, long updated)
name
- The name of this IAtomicLong instance.expected
- the expected valueupdated
- the new valueObject decrementAndGet(String name)
name
- The name of this IAtomicLong instance.Object get(String name)
name
- The name of this IAtomicLong instance.Object getAndAdd(String name, long delta)
name
- The name of this IAtomicLong instance.delta
- the value to add to the current valueObject getAndSet(String name, long newValue)
name
- The name of this IAtomicLong instance.newValue
- the new valueObject incrementAndGet(String name)
name
- The name of this IAtomicLong instance.Object getAndIncrement(String name)
name
- The name of this IAtomicLong instance.void set(String name, long newValue)
name
- The name of this IAtomicLong instance.newValue
- The new valueCopyright © 2016 Hazelcast, Inc.. All Rights Reserved.