Hazelcast C++ Client
Public Member Functions | List of all members
hazelcast::client::crdt::pncounter::PNCounter Class Referenceabstract
+ Inheritance diagram for hazelcast::client::crdt::pncounter::PNCounter:

Public Member Functions

virtual int64_t get ()=0
 Returns the current value of the counter. More...
 
virtual int64_t getAndAdd (int64_t delta)=0
 Adds the given value to the current value. More...
 
virtual int64_t addAndGet (int64_t delta)=0
 Adds the given value to the current value. More...
 
virtual int64_t getAndSubtract (int64_t delta)=0
 Subtracts the given value from the current value. More...
 
virtual int64_t subtractAndGet (int64_t delta)=0
 Subtracts the given value from the current value. More...
 
virtual int64_t decrementAndGet ()=0
 Decrements by one the current value. More...
 
virtual int64_t incrementAndGet ()=0
 Increments by one the current value. More...
 
virtual int64_t getAndDecrement ()=0
 Decrements by one the current value. More...
 
virtual int64_t getAndIncrement ()=0
 Increments by one the current value. More...
 
virtual void reset ()=0
 Resets the observed state by this PN counter. More...
 
- Public Member Functions inherited from hazelcast::client::DistributedObject
virtual const std::string & getServiceName () const =0
 Returns the service name for this object.
 
virtual const std::string & getName () const =0
 Returns the unique name for this DistributedObject. More...
 
virtual void destroy ()=0
 Destroys this object cluster-wide. More...
 
virtual ~DistributedObject ()
 Destructor.
 

Member Function Documentation

◆ addAndGet()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::addAndGet ( int64_t  delta)
pure virtual

Adds the given value to the current value.

Parameters
deltathe value to add
Returns
the updated value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ decrementAndGet()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::decrementAndGet ( )
pure virtual

Decrements by one the current value.

Returns
the updated value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ get()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::get ( )
pure virtual

Returns the current value of the counter.

Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ getAndAdd()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::getAndAdd ( int64_t  delta)
pure virtual

Adds the given value to the current value.

Parameters
deltathe value to add
Returns
the previous value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ getAndDecrement()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::getAndDecrement ( )
pure virtual

Decrements by one the current value.

Returns
the previous value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ getAndIncrement()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::getAndIncrement ( )
pure virtual

Increments by one the current value.

Returns
the previous value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have beenlost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ getAndSubtract()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::getAndSubtract ( int64_t  delta)
pure virtual

Subtracts the given value from the current value.

Parameters
deltathe value to add
Returns
the previous value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ incrementAndGet()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::incrementAndGet ( )
pure virtual

Increments by one the current value.

Returns
the updated value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

◆ reset()

virtual void hazelcast::client::crdt::pncounter::PNCounter::reset ( )
pure virtual

Resets the observed state by this PN counter.

This method may be used after a method invocation has thrown a ConsistencyLostException to reset the proxy and to be able to start a new session.

◆ subtractAndGet()

virtual int64_t hazelcast::client::crdt::pncounter::PNCounter::subtractAndGet ( int64_t  delta)
pure virtual

Subtracts the given value from the current value.

Parameters
deltathe value to subtract
Returns
the updated value
Exceptions
NoDataMemberInClusterExceptionif the cluster does not contain any data members
UnsupportedOperationExceptionif the cluster version is less than 3.10
ConsistencyLostExceptionif the session guarantees have been lost (see class level javadoc)
See also
ClusterService::getClusterVersion()

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