IAtomicLong is a distributed atomic long implementation.
More...
#include <IAtomicLong.h>
|
class | HazelcastClient |
|
class | IdGenerator |
|
IAtomicLong is a distributed atomic long implementation.
Note that, in node failures atomic long will be restored via backup.
int64_t hazelcast::client::IAtomicLong::addAndGet |
( |
int64_t |
delta | ) |
|
adds the given value to the current value.
- Parameters
-
- Returns
- the updated value
bool hazelcast::client::IAtomicLong::compareAndSet |
( |
int64_t |
expect, |
|
|
int64_t |
update |
|
) |
| |
sets the value to the given updated value only if the current value is equal to the expected value.
- Parameters
-
expect | the expected value |
update | the new value |
- Returns
- true if successful; or false if the actual value was not equal to the expected value.
int64_t hazelcast::client::IAtomicLong::decrementAndGet |
( |
| ) |
|
decrements the current value by one.
- Returns
- the updated value
int64_t hazelcast::client::IAtomicLong::get |
( |
| ) |
|
Gets the current value.
- Returns
- the current value
int64_t hazelcast::client::IAtomicLong::getAndAdd |
( |
int64_t |
delta | ) |
|
adds the given value to the current value.
- Parameters
-
- Returns
- the old value before the add
int64_t hazelcast::client::IAtomicLong::getAndIncrement |
( |
| ) |
|
increments the current value by one.
- Returns
- the old value
int64_t hazelcast::client::IAtomicLong::getAndSet |
( |
int64_t |
newValue | ) |
|
sets the given value and returns the old value.
- Parameters
-
- Returns
- the old value
int64_t hazelcast::client::IAtomicLong::incrementAndGet |
( |
| ) |
|
increments the current value by one.
- Returns
- the updated value
void hazelcast::client::IAtomicLong::set |
( |
int64_t |
newValue | ) |
|
sets the given value.
- Parameters
-
The documentation for this class was generated from the following files:
- hazelcast/include/hazelcast/client/IAtomicLong.h
- hazelcast/src/hazelcast/client/IAtomicLong.cpp