/export/rook1/users/build/gfcppsancout64/product/include/gfcpp/statistics/Statistics.hpp

Go to the documentation of this file.
00001 #ifndef _GEMFIRE_STATISTICS_STATISTICS_HPP_
00002 #define _GEMFIRE_STATISTICS_STATISTICS_HPP_
00003 /*=========================================================================
00004  * (c) Copyright 2004-2007, GemStone Systems, Inc. All Rights Reserved.
00005  * 1260 NW Waterhouse Ave., Suite 200,  Beaverton, OR 97006
00006  *=========================================================================
00007  */
00008 
00009 #include "../gfcpp_globals.hpp" 
00010 #include "StatisticsType.hpp"
00011 #include "StatisticDescriptor.hpp"                                                                               
00012                                                                                 
00016 namespace gemfire_statistics {
00021 class CPPCACHE_EXPORT Statistics {
00022 
00023  public  :
00030    virtual void close()=0;
00031 
00033 
00045    virtual int32 nameToId(const char* name)=0;
00046 
00047   
00059    virtual StatisticDescriptor* nameToDescriptor(const char* name)=0;
00060 
00064    virtual int64 getUniqueId()=0;
00065 
00069    virtual  StatisticsType* getType()=0;
00073    virtual  const char* getTextId()=0;
00078 virtual int64 getNumericId()=0;  
00088    virtual  bool isAtomic()=0;
00095    virtual  bool isShared()=0;
00099    virtual  bool isClosed()=0;
00100   
00102 
00113    virtual void setInt(int32 id, int32 value)=0;
00114 
00125    virtual void setInt(char* name, int32 value)=0;
00126 
00138    virtual void setInt(StatisticDescriptor* descriptor, int32 value)=0;
00139 
00153  virtual void setLong(int32 id, int64 value) = 0; 
00165    virtual void setLong(StatisticDescriptor* descriptor, int64 value)=0;
00166 
00177    virtual void setLong(char* name, int64 value)=0;
00178 
00189    virtual void setDouble(int32 id, double value)=0;
00190 
00202    virtual void setDouble(StatisticDescriptor* descriptor, double value)=0;
00213    virtual void setDouble(char* name, double value)=0;
00214 
00216 
00225    virtual int32 getInt(int32 id)=0;
00226 
00237    virtual int32 getInt(StatisticDescriptor* descriptor)=0;
00248    virtual int32 getInt(char* name)=0;
00249 
00258    virtual int64 getLong(int32 id)=0;
00259 
00260 
00271    virtual int64 getLong(StatisticDescriptor* descriptor)=0;
00282    virtual int64 getLong(char* name)=0;
00283 
00292    virtual double getDouble(int32 id)=0;
00293 
00304    virtual double getDouble(StatisticDescriptor* descriptor)=0;
00315    virtual double getDouble(char* name)=0;
00316 
00325 //   virtual Number get(StatisticDescriptor* descriptor)=0;
00326 
00333 //   virtual Number get(char* name)=0;
00334 
00343     virtual int64 getRawBits(StatisticDescriptor* descriptor)=0;
00344 
00351    // virtual double getRawBits(char* name)=0;
00352 
00354 
00368    virtual int32 incInt(int32 id, int32 delta)=0;
00369 
00383    virtual int32 incInt(StatisticDescriptor* descriptor, int32 delta)=0;
00384 
00397    virtual int32 incInt(char* name, int32 delta)=0;
00398 
00412    virtual int64 incLong(int32 id, int64 delta)=0;
00413 
00428    virtual int64 incLong(StatisticDescriptor* descriptor, int64 delta)=0;
00442    virtual int64 incLong(char* name, int64 delta)=0;
00443 
00457    virtual double incDouble(int32 id, double delta)=0;
00458 
00473    virtual double incDouble(StatisticDescriptor* descriptor, double delta)=0;
00487    virtual double incDouble(char* name, double delta)=0;
00488 
00489 protected:   
00493    virtual ~Statistics()=0; 
00494 };//class
00495 
00496 };//namespace
00497 
00498 #endif // _GEMFIRE_STATISTICS_STATISTICS_HPP_

GemFire C++ Cache API Documentation