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::RemoteCounterManager Class Referenceabstract

#include <RemoteCounterManager.h>

Public Member Functions

virtual std::shared_ptr
< StrongCounter
getStrongCounter (std::string name)=0
 
virtual std::shared_ptr
< WeakCounter
getWeakCounter (std::string name)=0
 
virtual bool defineCounter (std::string name, CounterConfiguration configuration)=0
 
virtual bool isDefined (std::string name)=0
 
virtual CounterConfiguration getConfiguration (std::string counterName)=0
 
virtual void remove (std::string counterName)=0
 
virtual std::set< std::string > getCounterNames ()=0
 
virtual ~RemoteCounterManager ()
 

Constructor & Destructor Documentation

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

Member Function Documentation

virtual bool infinispan::hotrod::RemoteCounterManager::defineCounter ( std::string  name,
CounterConfiguration  configuration 
)
pure virtual

Defines a counter with the specific

name

and CounterConfiguration.

It does not overwrite existing configurations.

Parameters
namethe counter name.
configurationthe counter configuration
Returns
true
if successfully defined or
false
if the counter exists or fails to defined.
virtual CounterConfiguration infinispan::hotrod::RemoteCounterManager::getConfiguration ( std::string  counterName)
pure virtual
Parameters
counterNamethe counter name.
Returns
the counter's CounterConfiguration or
null
if the counter is not defined.
virtual std::set<std::string> infinispan::hotrod::RemoteCounterManager::getCounterNames ( )
pure virtual

Returns a set of defined counter names.

Returns
a set of defined counter names.
virtual std::shared_ptr<StrongCounter> infinispan::hotrod::RemoteCounterManager::getStrongCounter ( std::string  name)
pure virtual

Returns the StrongCounter with that specific name.

If the StrongCounter does not exists, it is created based on the CounterConfiguration.

Note that the counter must be defined prior to this method invocation using RemoteCounterManager::defineCounter(std::string, CounterConfiguration) or via global configuration. This method only supports CounterType::BOUNDED_STRONG and CounterType::UNBOUNDED_STRONG counters.

Parameters
namethe counter name.
Returns
the StrongCounter instance.
Exceptions
org.infinispan.counter.exception.CounterExceptionif unable to retrieve the counter.
org.infinispan.counter.exception.CounterConfigurationExceptionif the counter configuration is not valid or it does not exists.
virtual std::shared_ptr<WeakCounter> infinispan::hotrod::RemoteCounterManager::getWeakCounter ( std::string  name)
pure virtual

Returns the WeakCounter with that specific name.

If the WeakCounter does not exists, it is created based on the CounterConfiguration.

Note that the counter must be defined prior to this method invocation using RemoteCounterManager::defineCounter(std::string, CounterConfiguration) or via global configuration. This method only supports CounterType::WEAK counters.

Parameters
namethe counter name.
Returns
the WeakCounter instance.
Exceptions
org.infinispan.counter.exception.CounterExceptionif unable to retrieve the counter.
org.infinispan.counter.exception.CounterConfigurationExceptionif the counter configuration is not valid or it does not exists.
virtual bool infinispan::hotrod::RemoteCounterManager::isDefined ( std::string  name)
pure virtual
Parameters
namethe counter name.
Returns
true
if the counter is defined or
false
if the counter is not defined or fails to check.
virtual void infinispan::hotrod::RemoteCounterManager::remove ( std::string  counterName)
pure virtual

It removes the counter from the cluster.

All instances returned by getWeakCounter(std::string) or getStrongCounter(std::tring) are destroyed and they shouldn't be used anymore. Also, the registered CounterListener are removed and they aren't invoked anymore.

Parameters
counterNameThe counter's name to remove.

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