Hazelcast C++ Client
 All Classes Functions Variables Enumerations 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

long addAndGet (long delta)
 adds the given value to the current value. More...
 
bool compareAndSet (long expect, long update)
 sets the value to the given updated value only if the current value is equal to the expected value. More...
 
long decrementAndGet ()
 decrements the current value by one. More...
 
long get ()
 Gets the current value. More...
 
long getAndAdd (long delta)
 adds the given value to the current value. More...
 
long getAndSet (long newValue)
 sets the given value and returns the old value. More...
 
long incrementAndGet ()
 increments the current value by one. More...
 
long getAndIncrement ()
 increments the current value by one. More...
 
void set (long 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

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

adds the given value to the current value.

Parameters
deltathe value to add
Returns
the updated value
bool hazelcast::client::IAtomicLong::compareAndSet ( long  expect,
long  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.
long hazelcast::client::IAtomicLong::decrementAndGet ( )

decrements the current value by one.

Returns
the updated value
long hazelcast::client::IAtomicLong::get ( )

Gets the current value.

Returns
the current value
long hazelcast::client::IAtomicLong::getAndAdd ( long  delta)

adds the given value to the current value.

Parameters
deltathe value to add
Returns
the old value before the add
long hazelcast::client::IAtomicLong::getAndIncrement ( )

increments the current value by one.

Returns
the old value
long hazelcast::client::IAtomicLong::getAndSet ( long  newValue)

sets the given value and returns the old value.

Parameters
newValuethe new value
Returns
the old value
long hazelcast::client::IAtomicLong::incrementAndGet ( )

increments the current value by one.

Returns
the updated value
void hazelcast::client::IAtomicLong::set ( long  newValue)

sets the given value.

Parameters
newValuethe new value

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