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

An instantiation of an existing StatisticsType object with methods for setting, incrementing and getting individual StatisticDescriptor values. More...

Public Member Functions

virtual void close ()=0
 Closes these statistics. More...
 
virtual double getDouble (int32_t id)=0
 Returns the value of the identified statistic of type double. More...
 
virtual double getDouble (StatisticDescriptor *descriptor)=0
 Returns the value of the described statistic of type double. More...
 
virtual double getDouble (char *name)=0
 Returns the value of the statistic of type double at the given name. More...
 
virtual int32_t getInt (int32_t id)=0
 Returns the value of the identified statistic of type int. More...
 
virtual int32_t getInt (apache::geode::statistics::StatisticDescriptor *descriptor)=0
 Returns the value of the described statistic of type int. More...
 
virtual int32_t getInt (char *name)=0
 Returns the value of the statistic of type int at the given name. More...
 
virtual int64_t getLong (int32_t id)=0
 Returns the value of the identified statistic of type long. More...
 
virtual int64_t getLong (StatisticDescriptor *descriptor)=0
 Returns the value of the described statistic of type long. More...
 
virtual int64_t getLong (char *name)=0
 Returns the value of the statistic of type long at the given name. More...
 
virtual int64_t getNumericId ()=0
 Gets the number associated with this instance that helps identify it. More...
 
virtual int64_t getRawBits (StatisticDescriptor *descriptor)=0
 Returns the value of the identified statistic. More...
 
virtual const char * getTextId ()=0
 Gets the text associated with this instance that helps identify it. More...
 
virtual StatisticsTypegetType ()=0
 Gets the StatisticsType of this instance. More...
 
virtual int64_t getUniqueId ()=0
 Gets a value that uniquely identifies this statistics. More...
 
virtual double incDouble (int32_t id, double delta)=0
 Increments the value of the identified statistic of type double by the given amount. More...
 
virtual double incDouble (StatisticDescriptor *descriptor, double delta)=0
 Increments the value of the described statistic of type double by the given amount. More...
 
virtual double incDouble (char *name, double delta)=0
 Increments the value of the statistic of type double with the given name by a given amount. More...
 
virtual int32_t incInt (int32_t id, int32_t delta)=0
 Returns the bits that represent the raw value of the named statistic. More...
 
virtual int32_t incInt (StatisticDescriptor *descriptor, int32_t delta)=0
 Increments the value of the described statistic of type int by the given amount. More...
 
virtual int32_t incInt (char *name, int32_t delta)=0
 Increments the value of the statistic of type int with the given name by a given amount. More...
 
virtual int64_t incLong (int32_t id, int64_t delta)=0
 Increments the value of the identified statistic of type long by the given amount. More...
 
virtual int64_t incLong (StatisticDescriptor *descriptor, int64_t delta)=0
 Increments the value of the described statistic of type long by the given amount. More...
 
virtual int64_t incLong (char *name, int64_t delta)=0
 Increments the value of the statistic of type long with the given name by a given amount. More...
 
virtual bool isAtomic ()=0
 Returns true if modifications are atomic. More...
 
virtual bool isClosed ()=0
 Returns true if the instance has been closed. More...
 
virtual bool isShared ()=0
 Returns true if the data for this instance is stored in shared memory. More...
 
virtual StatisticDescriptornameToDescriptor (const char *name)=0
 Returns the descriptor of the statistic with the given name in this statistics instance. More...
 
virtual int32_t nameToId (const char *name)=0
 Returns the id of the statistic with the given name in this statistics instance. More...
 
virtual void setDouble (int32_t id, double value)=0
 Sets the value of a statistic with the given id whose type is double. More...
 
virtual void setDouble (apache::geode::statistics::StatisticDescriptor *descriptor, double value)=0
 Sets the value of a described statistic of type double More...
 
virtual void setDouble (char *name, double value)=0
 Sets the value of a named statistic of type double. More...
 
virtual void setInt (int32_t id, int32_t value)=0
 Sets the value of a statistic with the given id whose type is int. More...
 
virtual void setInt (char *name, int32_t value)=0
 Sets the value of a named statistic of type int More...
 
virtual void setInt (StatisticDescriptor *descriptor, int32_t value)=0
 Sets the value of a described statistic of type int More...
 
virtual void setLong (int32_t id, int64_t value)=0
 Sets the value of a statistic with the given id whose type is long. More...
 
virtual void setLong (StatisticDescriptor *descriptor, int64_t value)=0
 Sets the value of a described statistic of type long More...
 
virtual void setLong (char *name, int64_t value)=0
 Sets the value of a named statistic of type long. More...
 

Protected Member Functions

virtual ~Statistics ()=0
 Destructor is protected to prevent direct deletion. More...
 

Detailed Description

An instantiation of an existing StatisticsType object with methods for setting, incrementing and getting individual StatisticDescriptor values.

Constructor & Destructor Documentation

virtual apache::geode::statistics::Statistics::~Statistics ( )
protectedpure virtual

Destructor is protected to prevent direct deletion.

Use close().

Member Function Documentation

virtual void apache::geode::statistics::Statistics::close ( )
pure virtual

Closes these statistics.

After statistics have been closed, they are no longer archived. A value access on a closed statistics always results in zero. A value modification on a closed statistics is ignored.

virtual double apache::geode::statistics::Statistics::getDouble ( int32_t  id)
pure virtual

Returns the value of the identified statistic of type double.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual double apache::geode::statistics::Statistics::getDouble ( StatisticDescriptor descriptor)
pure virtual

Returns the value of the described statistic of type double.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
Exceptions
IllegalArgumentExceptionIf no statistic exists with the specified descriptor or if the described statistic is not of type double.
virtual double apache::geode::statistics::Statistics::getDouble ( char *  name)
pure virtual

Returns the value of the statistic of type double at the given name.

Parameters
namestatistic name
Exceptions
IllegalArgumentExceptionIf no statistic exists with name name or if the statistic named name is not of type double.
virtual int32_t apache::geode::statistics::Statistics::getInt ( int32_t  id)
pure virtual

Returns the value of the identified statistic of type int.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual int32_t apache::geode::statistics::Statistics::getInt ( apache::geode::statistics::StatisticDescriptor descriptor)
pure virtual

Returns the value of the described statistic of type int.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
Exceptions
IllegalArgumentExceptionIf no statistic exists with the specified descriptor or if the described statistic is not of type int.
virtual int32_t apache::geode::statistics::Statistics::getInt ( char *  name)
pure virtual

Returns the value of the statistic of type int at the given name.

Parameters
namestatistic name
Exceptions
IllegalArgumentExceptionIf no statistic exists with name name or if the statistic named name is not of type int.
virtual int64_t apache::geode::statistics::Statistics::getLong ( int32_t  id)
pure virtual

Returns the value of the identified statistic of type long.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual int64_t apache::geode::statistics::Statistics::getLong ( StatisticDescriptor descriptor)
pure virtual

Returns the value of the described statistic of type long.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
Exceptions
IllegalArgumentExceptionIf no statistic exists with the specified descriptor or if the described statistic is not of type long.
virtual int64_t apache::geode::statistics::Statistics::getLong ( char *  name)
pure virtual

Returns the value of the statistic of type long at the given name.

Parameters
namestatistic name
Exceptions
IllegalArgumentExceptionIf no statistic exists with name name or if the statistic named name is not of type long.
virtual int64_t apache::geode::statistics::Statistics::getNumericId ( )
pure virtual

Gets the number associated with this instance that helps identify it.

virtual int64_t apache::geode::statistics::Statistics::getRawBits ( StatisticDescriptor descriptor)
pure virtual

Returns the value of the identified statistic.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
Exceptions
IllegalArgumentExceptionIf the described statistic does not exist Returns the value of the named statistic.
IllegalArgumentExceptionIf the named statistic does not exist Returns the bits that represent the raw value of the described statistic.
Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
Exceptions
IllegalArgumentExceptionIf the described statistic does not exist
virtual const char* apache::geode::statistics::Statistics::getTextId ( )
pure virtual

Gets the text associated with this instance that helps identify it.

virtual StatisticsType* apache::geode::statistics::Statistics::getType ( )
pure virtual

Gets the StatisticsType of this instance.

virtual int64_t apache::geode::statistics::Statistics::getUniqueId ( )
pure virtual

Gets a value that uniquely identifies this statistics.

virtual double apache::geode::statistics::Statistics::incDouble ( int32_t  id,
double  delta 
)
pure virtual

Increments the value of the identified statistic of type double by the given amount.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual double apache::geode::statistics::Statistics::incDouble ( StatisticDescriptor descriptor,
double  delta 
)
pure virtual

Increments the value of the described statistic of type double by the given amount.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf no statistic exists with the given descriptor or if the described statistic is not of type double.
virtual double apache::geode::statistics::Statistics::incDouble ( char *  name,
double  delta 
)
pure virtual

Increments the value of the statistic of type double with the given name by a given amount.

Parameters
namestatistic name
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf no statistic exists with name name or if the statistic named name is not of type double.
virtual int32_t apache::geode::statistics::Statistics::incInt ( int32_t  id,
int32_t  delta 
)
pure virtual

Returns the bits that represent the raw value of the named statistic.

Exceptions
IllegalArgumentExceptionIf the named statistic does not exist Increments the value of the identified statistic of type int by the given amount.
Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual int32_t apache::geode::statistics::Statistics::incInt ( StatisticDescriptor descriptor,
int32_t  delta 
)
pure virtual

Increments the value of the described statistic of type int by the given amount.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf no statistic exists with the given descriptor or if the described statistic is not of type int.
virtual int32_t apache::geode::statistics::Statistics::incInt ( char *  name,
int32_t  delta 
)
pure virtual

Increments the value of the statistic of type int with the given name by a given amount.

Parameters
namestatistic name
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf no statistic exists with name name or if the statistic named name is not of type int.
virtual int64_t apache::geode::statistics::Statistics::incLong ( int32_t  id,
int64_t  delta 
)
pure virtual

Increments the value of the identified statistic of type long by the given amount.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual int64_t apache::geode::statistics::Statistics::incLong ( StatisticDescriptor descriptor,
int64_t  delta 
)
pure virtual

Increments the value of the described statistic of type long by the given amount.

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf no statistic exists with the given descriptor or if the described statistic is not of type long.
virtual int64_t apache::geode::statistics::Statistics::incLong ( char *  name,
int64_t  delta 
)
pure virtual

Increments the value of the statistic of type long with the given name by a given amount.

Parameters
namestatistic name
deltachange value to be added
Returns
The value of the statistic after it has been incremented
Exceptions
IllegalArgumentExceptionIf no statistic exists with name name or if the statistic named name is not of type long.
virtual bool apache::geode::statistics::Statistics::isAtomic ( )
pure virtual

Returns true if modifications are atomic.

This means that multiple threads can safely modify this instance without additional synchronization.

Returns false if modifications are not atomic. This means that modifications to this instance are cheaper but not thread safe.

Note that all instances that are shared are also atomic.

virtual bool apache::geode::statistics::Statistics::isClosed ( )
pure virtual

Returns true if the instance has been closed.

virtual bool apache::geode::statistics::Statistics::isShared ( )
pure virtual

Returns true if the data for this instance is stored in shared memory.

Returns false if the data is store in local memory.

Note that all instances that are shared are also atomic.

virtual StatisticDescriptor* apache::geode::statistics::Statistics::nameToDescriptor ( const char *  name)
pure virtual

Returns the descriptor of the statistic with the given name in this statistics instance.

Parameters
namestatistic name
Exceptions
IllegalArgumentExceptionNo statistic named name exists in this statistics instance.
See also
StatisticsType::nameToId
virtual int32_t apache::geode::statistics::Statistics::nameToId ( const char *  name)
pure virtual

Returns the id of the statistic with the given name in this statistics instance.

Parameters
namestatistic name
Exceptions
IllegalArgumentExceptionNo statistic named name exists in this statistics instance.
See also
StatisticsType::nameToDescriptor
virtual void apache::geode::statistics::Statistics::setDouble ( int32_t  id,
double  value 
)
pure virtual

Sets the value of a statistic with the given id whose type is double.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
valuevalue to set
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual void apache::geode::statistics::Statistics::setDouble ( apache::geode::statistics::StatisticDescriptor descriptor,
double  value 
)
pure virtual

Sets the value of a described statistic of type double

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
valuevalue to set
Exceptions
IllegalArgumentExceptionIf no statistic exists for the given descriptor or if the described statistic is not of type double.
virtual void apache::geode::statistics::Statistics::setDouble ( char *  name,
double  value 
)
pure virtual

Sets the value of a named statistic of type double.

Parameters
namestatistic name
valuevalue to set
Exceptions
IllegalArgumentExceptionIf no statistic exists named name or if the statistic with name name is not of type double.
virtual void apache::geode::statistics::Statistics::setInt ( int32_t  id,
int32_t  value 
)
pure virtual

Sets the value of a statistic with the given id whose type is int.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
valuevalue to set
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual void apache::geode::statistics::Statistics::setInt ( char *  name,
int32_t  value 
)
pure virtual

Sets the value of a named statistic of type int

Parameters
namestatistic name
valuevalue to set
Exceptions
IllegalArgumentExceptionIf no statistic exists named name or if the statistic with name name is not of type int.
virtual void apache::geode::statistics::Statistics::setInt ( StatisticDescriptor descriptor,
int32_t  value 
)
pure virtual

Sets the value of a described statistic of type int

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
valuevalue to set
Exceptions
IllegalArgumentExceptionIf no statistic exists for the given descriptor or if the described statistic is not of type int.
virtual void apache::geode::statistics::Statistics::setLong ( int32_t  id,
int64_t  value 
)
pure virtual

Sets the value of a statistic with the given id whose type is long.

Parameters
ida statistic id obtained with nameToId or StatisticsType#nameToId.
valuevalue to set
Exceptions
IllegalArgumentExceptionIf the id is invalid.
virtual void apache::geode::statistics::Statistics::setLong ( StatisticDescriptor descriptor,
int64_t  value 
)
pure virtual

Sets the value of a described statistic of type long

Parameters
descriptora statistic descriptor obtained with nameToDescriptor or StatisticsType#nameToDescriptor.
valuevalue to set
Exceptions
IllegalArgumentExceptionIf no statistic exists for the given descriptor or if the described statistic is not of type long.
virtual void apache::geode::statistics::Statistics::setLong ( char *  name,
int64_t  value 
)
pure virtual

Sets the value of a named statistic of type long.

Parameters
namestatistic name
valuevalue to set
Exceptions
IllegalArgumentExceptionIf no statistic exists named name or if the statistic with name name is not of type long.

Pivotal GemFire C++ Cache API Documentation