Pivotal GemFire Native Client Cache Reference  9.0.6
gemfire_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 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 getInt (int32 id)=0
 Returns the value of the identified statistic of type int. More...
 
virtual int32 getInt (StatisticDescriptor *descriptor)=0
 Returns the value of the described statistic of type int. More...
 
virtual int32 getInt (char *name)=0
 Returns the value of the statistic of type int at the given name. More...
 
virtual int64 getLong (int32 id)=0
 Returns the value of the identified statistic of type long. More...
 
virtual int64 getLong (StatisticDescriptor *descriptor)=0
 Returns the value of the described statistic of type long. More...
 
virtual int64 getLong (char *name)=0
 Returns the value of the statistic of type long at the given name. More...
 
virtual int64 getNumericId ()=0
 Gets the number associated with this instance that helps identify it. More...
 
virtual int64 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 getUniqueId ()=0
 Gets a value that uniquely identifies this statistics. More...
 
virtual double incDouble (int32 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 incInt (int32 id, int32 delta)=0
 Returns the bits that represent the raw value of the named statistic. More...
 
virtual int32 incInt (StatisticDescriptor *descriptor, int32 delta)=0
 Increments the value of the described statistic of type int by the given amount. More...
 
virtual int32 incInt (char *name, int32 delta)=0
 Increments the value of the statistic of type int with the given name by a given amount. More...
 
virtual int64 incLong (int32 id, int64 delta)=0
 Increments the value of the identified statistic of type long by the given amount. More...
 
virtual int64 incLong (StatisticDescriptor *descriptor, int64 delta)=0
 Increments the value of the described statistic of type long by the given amount. More...
 
virtual int64 incLong (char *name, int64 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 nameToId (const char *name)=0
 Returns the id of the statistic with the given name in this statistics instance. More...
 
virtual void setDouble (int32 id, double value)=0
 Sets the value of a statistic with the given id whose type is double. More...
 
virtual void setDouble (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 id, int32 value)=0
 Sets the value of a statistic with the given id whose type is int. More...
 
virtual void setInt (char *name, int32 value)=0
 Sets the value of a named statistic of type int More...
 
virtual void setInt (StatisticDescriptor *descriptor, int32 value)=0
 Sets the value of a described statistic of type int More...
 
virtual void setLong (int32 id, int64 value)=0
 Sets the value of a statistic with the given id whose type is long. More...
 
virtual void setLong (StatisticDescriptor *descriptor, int64 value)=0
 Sets the value of a described statistic of type long More...
 
virtual void setLong (char *name, int64 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 gemfire_statistics::Statistics::~Statistics ( )
protectedpure virtual

Destructor is protected to prevent direct deletion.

Use close().

Member Function Documentation

virtual void gemfire_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 gemfire_statistics::Statistics::getDouble ( int32  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 gemfire_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 gemfire_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 gemfire_statistics::Statistics::getInt ( int32  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 gemfire_statistics::Statistics::getInt ( 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 gemfire_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 gemfire_statistics::Statistics::getLong ( int32  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 gemfire_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 gemfire_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 gemfire_statistics::Statistics::getNumericId ( )
pure virtual

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

virtual int64 gemfire_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* gemfire_statistics::Statistics::getTextId ( )
pure virtual

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

virtual StatisticsType* gemfire_statistics::Statistics::getType ( )
pure virtual

Gets the StatisticsType of this instance.

virtual int64 gemfire_statistics::Statistics::getUniqueId ( )
pure virtual

Gets a value that uniquely identifies this statistics.

virtual double gemfire_statistics::Statistics::incDouble ( int32  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 gemfire_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 gemfire_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 gemfire_statistics::Statistics::incInt ( int32  id,
int32  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 gemfire_statistics::Statistics::incInt ( StatisticDescriptor descriptor,
int32  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 gemfire_statistics::Statistics::incInt ( char *  name,
int32  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 gemfire_statistics::Statistics::incLong ( int32  id,
int64  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 gemfire_statistics::Statistics::incLong ( StatisticDescriptor descriptor,
int64  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 gemfire_statistics::Statistics::incLong ( char *  name,
int64  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 gemfire_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 gemfire_statistics::Statistics::isClosed ( )
pure virtual

Returns true if the instance has been closed.

virtual bool gemfire_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* gemfire_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 gemfire_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 gemfire_statistics::Statistics::setDouble ( int32  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 gemfire_statistics::Statistics::setDouble ( 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 gemfire_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 gemfire_statistics::Statistics::setInt ( int32  id,
int32  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 gemfire_statistics::Statistics::setInt ( char *  name,
int32  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 gemfire_statistics::Statistics::setInt ( StatisticDescriptor descriptor,
int32  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 gemfire_statistics::Statistics::setLong ( int32  id,
int64  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 gemfire_statistics::Statistics::setLong ( StatisticDescriptor descriptor,
int64  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 gemfire_statistics::Statistics::setLong ( char *  name,
int64  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.

GemFire C++ Cache API Documentation