VMware GemFire Native C++ Reference  9.1
Statistics.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef GEODE_STATISTICS_STATISTICS_H_
4 #define GEODE_STATISTICS_STATISTICS_H_
5 
6 /*
7  * Licensed to the Apache Software Foundation (ASF) under one or more
8  * contributor license agreements. See the NOTICE file distributed with
9  * this work for additional information regarding copyright ownership.
10  * The ASF licenses this file to You under the Apache License, Version 2.0
11  * (the "License"); you may not use this file except in compliance with
12  * the License. You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */
22 
23 #include <geode/geode_globals.hpp>
26 
30 namespace apache {
31 namespace geode {
32 namespace statistics {
40  public:
47  virtual void close() = 0;
48 
50 
62  virtual int32_t nameToId(const char* name) = 0;
63 
75  virtual StatisticDescriptor* nameToDescriptor(const char* name) = 0;
76 
80  virtual int64_t getUniqueId() = 0;
81 
85  virtual StatisticsType* getType() = 0;
89  virtual const char* getTextId() = 0;
94  virtual int64_t getNumericId() = 0;
105  virtual bool isAtomic() = 0;
112  virtual bool isShared() = 0;
116  virtual bool isClosed() = 0;
117 
119 
130  virtual void setInt(int32_t id, int32_t value) = 0;
131 
142  virtual void setInt(char* name, int32_t value) = 0;
143 
156  virtual void setInt(StatisticDescriptor* descriptor, int32_t value) = 0;
157 
169  virtual void setLong(int32_t id, int64_t value) = 0;
182  virtual void setLong(StatisticDescriptor* descriptor, int64_t value) = 0;
183 
194  virtual void setLong(char* name, int64_t value) = 0;
195 
206  virtual void setDouble(int32_t id, double value) = 0;
207 
220  virtual void setDouble(
222  double value) = 0;
233  virtual void setDouble(char* name, double value) = 0;
234 
236 
245  virtual int32_t getInt(int32_t id) = 0;
246 
259  virtual int32_t getInt(
271  virtual int32_t getInt(char* name) = 0;
272 
281  virtual int64_t getLong(int32_t id) = 0;
282 
295  virtual int64_t getLong(StatisticDescriptor* descriptor) = 0;
306  virtual int64_t getLong(char* name) = 0;
307 
316  virtual double getDouble(int32_t id) = 0;
317 
330  virtual double getDouble(StatisticDescriptor* descriptor) = 0;
341  virtual double getDouble(char* name) = 0;
342 
352  // virtual Number get(StatisticDescriptor* descriptor)=0;
353 
360  // virtual Number get(char* name)=0;
361 
371  virtual int64_t getRawBits(StatisticDescriptor* descriptor) = 0;
372 
379  // virtual double getRawBits(char* name)=0;
380 
382 
396  virtual int32_t incInt(int32_t id, int32_t delta) = 0;
397 
412  virtual int32_t incInt(StatisticDescriptor* descriptor, int32_t delta) = 0;
413 
426  virtual int32_t incInt(char* name, int32_t delta) = 0;
427 
441  virtual int64_t incLong(int32_t id, int64_t delta) = 0;
442 
458  virtual int64_t incLong(StatisticDescriptor* descriptor, int64_t delta) = 0;
472  virtual int64_t incLong(char* name, int64_t delta) = 0;
473 
488  virtual double incDouble(int32_t id, double delta) = 0;
489 
505  virtual double incDouble(StatisticDescriptor* descriptor, double delta) = 0;
519  virtual double incDouble(char* name, double delta) = 0;
520 
521  protected:
525  virtual ~Statistics() = 0;
526 }; // class
527 
528 } // namespace statistics
529 } // namespace geode
530 } // namespace apache
531 
532 #endif // GEODE_STATISTICS_STATISTICS_H_
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
An instantiation of an existing StatisticsType object with methods for setting, incrementing and gett...
Definition: Statistics.hpp:39
Describes an individual statistic whose value is updated by an application and may be archived by Geo...
Definition: StatisticDescriptor.hpp:47
This namespace contains all the Geode C++ API classes, enumerations and globals.
Used to describe a logical collection of StatisticDescriptors.
Definition: StatisticsType.hpp:45

Pivotal GemFire C++ Cache API Documentation