Hazelcast C++ Client
 All Classes Functions Variables Enumerations Enumerator Pages
Public Member Functions | Friends | List of all members
hazelcast::client::IAtomicLong Class Reference

IAtomicLong is a distributed atomic long implementation. More...

#include <IAtomicLong.h>

+ Inheritance diagram for hazelcast::client::IAtomicLong:

Public Member Functions

int64_t addAndGet (int64_t delta)
 adds the given value to the current value. More...
 
bool 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. More...
 
int64_t decrementAndGet ()
 decrements the current value by one. More...
 
int64_t get ()
 Gets the current value. More...
 
int64_t getAndAdd (int64_t delta)
 adds the given value to the current value. More...
 
int64_t getAndSet (int64_t newValue)
 sets the given value and returns the old value. More...
 
int64_t incrementAndGet ()
 increments the current value by one. More...
 
int64_t getAndIncrement ()
 increments the current value by one. More...
 
void set (int64_t newValue)
 sets the given value. More...
 

Friends

class HazelcastClient
 
class IdGenerator
 

Detailed Description

IAtomicLong is a distributed atomic long implementation.

Note that, in node failures atomic long will be restored via backup.

Member Function Documentation

int64_t hazelcast::client::IAtomicLong::addAndGet ( int64_t  delta)

adds the given value to the current value.

Parameters
deltathe value to add
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
expectthe expected value
updatethe 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
deltathe value to add
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
newValuethe new value
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
newValuethe new value

The documentation for this class was generated from the following files: