Infinispan HotRod C++ Client  8.3.1.Final
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | List of all members
infinispan::hotrod::StrongCounter Class Referenceabstract

#include <Counters.h>

Inheritance diagram for infinispan::hotrod::StrongCounter:
infinispan::hotrod::Counter

Public Member Functions

virtual long getValue ()=0
 
virtual long addAndGet (long delta)=0
 
virtual long incrementAndGet ()=0
 
virtual long decrementAndGet ()=0
 
virtual long compareAndSwap (long expect, long update)=0
 
virtual bool compareAndSet (long expect, long update)=0
 
virtual ~StrongCounter ()
 
- Public Member Functions inherited from infinispan::hotrod::Counter
virtual std::string getName ()=0
 
virtual CounterConfiguration getConfiguration ()=0
 
virtual void reset ()=0
 
virtual void remove ()=0
 
virtual const void * addListener (const event::CounterListener *listener)=0
 
virtual void removeListener (const void *handler)=0
 

Constructor & Destructor Documentation

virtual infinispan::hotrod::StrongCounter::~StrongCounter ( )
inlinevirtual

Member Function Documentation

virtual long infinispan::hotrod::StrongCounter::addAndGet ( long  delta)
pure virtual

Atomically adds the given value and return the new value.

Parameters
deltaThe non-zero value to add. It can be negative.
Returns
The new value.
virtual bool infinispan::hotrod::StrongCounter::compareAndSet ( long  expect,
long  update 
)
pure virtual

Atomically sets the value to the given updated value if the current value

==

the expected value.

It is the same as

return compareAndSwap(expect, update).thenApply(value -> value == expect);
Parameters
expectthe expected value
updatethe new value
Returns
true
if successful,
false
otherwise.
virtual long infinispan::hotrod::StrongCounter::compareAndSwap ( long  expect,
long  update 
)
pure virtual

Atomically sets the value to the given updated value if the current value

==

the expected value.

The operation is successful if the return value is equals to the expected value.

Parameters
expectthe expected value.
updatethe new value.
Returns
the previous counter's value.
virtual long infinispan::hotrod::StrongCounter::decrementAndGet ( )
pure virtual

Atomically decrements the counter and returns the new value

Returns
The new value.
virtual long infinispan::hotrod::StrongCounter::getValue ( )
pure virtual

It fetches the current value.

It may go remotely to fetch the current value.

Returns
The current value.
virtual long infinispan::hotrod::StrongCounter::incrementAndGet ( )
pure virtual

Atomically increments the counter and returns the new value.

Returns
The new value.

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