VMware GemFire Native C++ Reference  9.1
apache::geode::statistics::StatisticsFactory Class Referenceabstract

Instances of this interface provide methods that create instances of StatisticDescriptor and StatisticsType. More...

Public Member Functions

virtual StatisticscreateAtomicStatistics (StatisticsType *type)=0
 Creates and returns a Statistics instance of the given type with default ids. More...
 
virtual StatisticscreateAtomicStatistics (StatisticsType *type, const char *textId)=0
 Creates and returns a Statistics instance of the given type, textId, and with a default numeric id. More...
 
virtual StatisticscreateAtomicStatistics (StatisticsType *type, const char *textId, int64_t numericId)=0
 Creates and returns a Statistics instance of the given type, textId, and numericId. More...
 
virtual StatisticDescriptorcreateDoubleCounter (const char *name, const char *description, const char *units, bool largerBetter=true)=0
 Creates and returns an int gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance. More...
 
virtual StatisticDescriptorcreateDoubleGauge (const char *name, const char *description, const char *units, bool largerBetter=false)=0
 Creates and returns an double gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance. More...
 
virtual StatisticDescriptorcreateIntCounter (const char *name, const char *description, const char *units, bool largerBetter=true)=0
 Creates and returns a long counter StatisticDescriptor with the given name, description, units,and with larger values indicating better performance. More...
 
virtual StatisticDescriptorcreateIntGauge (const char *name, const char *description, const char *units, bool largerBetter=false)=0
 Creates and returns an int gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance. More...
 
virtual StatisticDescriptorcreateLongCounter (const char *name, const char *description, const char *units, bool largerBetter=true)=0
 Creates and returns a double counter StatisticDescriptor with the given name, description, units, and with larger values indicating better performance. More...
 
virtual StatisticDescriptorcreateLongGauge (const char *name, const char *description, const char *units, bool largerBetter=false)=0
 Creates and returns an long gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance. More...
 
virtual StatisticscreateStatistics (StatisticsType *type)=0
 Creates and returns a Statistics instance of the given type with default ids. More...
 
virtual StatisticscreateStatistics (StatisticsType *type, const char *textId)=0
 Creates and returns a Statistics instance of the given type, textId, and with a default numeric id. More...
 
virtual StatisticscreateStatistics (StatisticsType *type, const char *textId, int64_t numericId)=0
 Creates and returns a Statistics instance of the given type, textId, and numericId. More...
 
virtual StatisticsTypecreateType (const char *name, const char *description, StatisticDescriptor **stats, int32_t statsLength)=0
 Creates and returns a StatisticsType with the given name, description, and StatisticDescriptor. More...
 
virtual StatisticsfindFirstStatisticsByType (StatisticsType *type)=0
 Return the first instance that matches the type, or NULL. More...
 
virtual StatisticsTypefindType (const char *name)=0
 Finds and returns an already created StatisticsType with the given name. More...
 
virtual int64_t getId ()=0
 Returns a numeric id that can be used to identify the manager. More...
 
virtual const char * getName ()=0
 Returns a name that can be used to identify the manager. More...
 

Static Public Member Functions

static StatisticsFactorygetExistingInstance ()
 Return a pre-existing statistics factory. More...
 

Detailed Description

Instances of this interface provide methods that create instances of StatisticDescriptor and StatisticsType.

Every StatisticsFactory is also a type factory.

A StatisticsFactory can create a statistic of three numeric types: int, long, and double. A statistic (StatisticDescriptor) can either be a gauge meaning that its value can increase and decrease or a counter meaning that its value is strictly increasing. Marking a statistic as a counter allows the Geode Manager Console to properly display a statistics whose value "wraps around" (that is, exceeds its maximum value).

Member Function Documentation

virtual Statistics* apache::geode::statistics::StatisticsFactory::createAtomicStatistics ( StatisticsType type)
pure virtual

Creates and returns a Statistics instance of the given type with default ids.

The created instance will be atomic.

virtual Statistics* apache::geode::statistics::StatisticsFactory::createAtomicStatistics ( StatisticsType type,
const char *  textId 
)
pure virtual

Creates and returns a Statistics instance of the given type, textId, and with a default numeric id.

The created instance will be atomic.

virtual Statistics* apache::geode::statistics::StatisticsFactory::createAtomicStatistics ( StatisticsType type,
const char *  textId,
int64_t  numericId 
)
pure virtual

Creates and returns a Statistics instance of the given type, textId, and numericId.

The created instance will be atomic.

virtual StatisticDescriptor* apache::geode::statistics::StatisticsFactory::createDoubleCounter ( const char *  name,
const char *  description,
const char *  units,
bool  largerBetter = true 
)
pure virtual

Creates and returns an int gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance.

virtual StatisticDescriptor* apache::geode::statistics::StatisticsFactory::createDoubleGauge ( const char *  name,
const char *  description,
const char *  units,
bool  largerBetter = false 
)
pure virtual

Creates and returns an double gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance.

virtual StatisticDescriptor* apache::geode::statistics::StatisticsFactory::createIntCounter ( const char *  name,
const char *  description,
const char *  units,
bool  largerBetter = true 
)
pure virtual

Creates and returns a long counter StatisticDescriptor with the given name, description, units,and with larger values indicating better performance.

virtual StatisticDescriptor* apache::geode::statistics::StatisticsFactory::createIntGauge ( const char *  name,
const char *  description,
const char *  units,
bool  largerBetter = false 
)
pure virtual

Creates and returns an int gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance.

virtual StatisticDescriptor* apache::geode::statistics::StatisticsFactory::createLongCounter ( const char *  name,
const char *  description,
const char *  units,
bool  largerBetter = true 
)
pure virtual

Creates and returns a double counter StatisticDescriptor with the given name, description, units, and with larger values indicating better performance.

virtual StatisticDescriptor* apache::geode::statistics::StatisticsFactory::createLongGauge ( const char *  name,
const char *  description,
const char *  units,
bool  largerBetter = false 
)
pure virtual

Creates and returns an long gauge StatisticDescriptor with the given name, description, units, and with smaller values indicating better performance.

virtual Statistics* apache::geode::statistics::StatisticsFactory::createStatistics ( StatisticsType type)
pure virtual

Creates and returns a Statistics instance of the given type with default ids.

The created instance may not be atomic.

virtual Statistics* apache::geode::statistics::StatisticsFactory::createStatistics ( StatisticsType type,
const char *  textId 
)
pure virtual

Creates and returns a Statistics instance of the given type, textId, and with a default numeric id.

The created instance may not be atomic.

virtual Statistics* apache::geode::statistics::StatisticsFactory::createStatistics ( StatisticsType type,
const char *  textId,
int64_t  numericId 
)
pure virtual

Creates and returns a Statistics instance of the given type, textId, and numericId.

The created instance may not be atomic.

virtual StatisticsType* apache::geode::statistics::StatisticsFactory::createType ( const char *  name,
const char *  description,
StatisticDescriptor **  stats,
int32_t  statsLength 
)
pure virtual

Creates and returns a StatisticsType with the given name, description, and StatisticDescriptor.

Exceptions
IllegalArgumentExceptionif a type with the given name already exists.
virtual Statistics* apache::geode::statistics::StatisticsFactory::findFirstStatisticsByType ( StatisticsType type)
pure virtual

Return the first instance that matches the type, or NULL.

virtual StatisticsType* apache::geode::statistics::StatisticsFactory::findType ( const char *  name)
pure virtual

Finds and returns an already created StatisticsType with the given name.

Returns null if the type does not exist.

static StatisticsFactory* apache::geode::statistics::StatisticsFactory::getExistingInstance ( )
static

Return a pre-existing statistics factory.

Typically configured through creation of a distributed system.

virtual int64_t apache::geode::statistics::StatisticsFactory::getId ( )
pure virtual

Returns a numeric id that can be used to identify the manager.

virtual const char* apache::geode::statistics::StatisticsFactory::getName ( )
pure virtual

Returns a name that can be used to identify the manager.


Pivotal GemFire C++ Cache API Documentation