VMware GemFire Native C++ Reference  9.1
StatisticsFactory.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef GEODE_STATISTICS_STATISTICSFACTORY_H_
4 #define GEODE_STATISTICS_STATISTICSFACTORY_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 #include <geode/geode_globals.hpp>
25 #include "../ExceptionTypes.hpp"
27 
31 namespace apache {
32 namespace geode {
33 namespace statistics {
34 
55  protected:
58 
59  public:
64  static StatisticsFactory* getExistingInstance();
65 
66  virtual ~StatisticsFactory() {}
67 
74  virtual StatisticDescriptor* createIntCounter(const char* name,
75  const char* description,
76  const char* units,
77  bool largerBetter = true) = 0;
78 
85  virtual StatisticDescriptor* createLongCounter(const char* name,
86  const char* description,
87  const char* units,
88  bool largerBetter = true) = 0;
89 
97  virtual StatisticDescriptor* createDoubleCounter(
98  const char* name, const char* description, const char* units,
99  bool largerBetter = true) = 0;
100 
106  virtual StatisticDescriptor* createIntGauge(const char* name,
107  const char* description,
108  const char* units,
109  bool largerBetter = false) = 0;
110 
116  virtual StatisticDescriptor* createLongGauge(const char* name,
117  const char* description,
118  const char* units,
119  bool largerBetter = false) = 0;
120 
126  virtual StatisticDescriptor* createDoubleGauge(const char* name,
127  const char* description,
128  const char* units,
129  bool largerBetter = false) = 0;
130 
138  virtual StatisticsType* createType(const char* name, const char* description,
139  StatisticDescriptor** stats,
140  int32_t statsLength) = 0;
141 
147  virtual StatisticsType* findType(const char* name) = 0;
148 
155  virtual Statistics* createStatistics(StatisticsType* type) = 0;
156 
163  virtual Statistics* createStatistics(StatisticsType* type,
164  const char* textId) = 0;
165 
172  virtual Statistics* createStatistics(StatisticsType* type, const char* textId,
173  int64_t numericId) = 0;
174 
181  virtual Statistics* createAtomicStatistics(StatisticsType* type) = 0;
182 
189  virtual Statistics* createAtomicStatistics(StatisticsType* type,
190  const char* textId) = 0;
191 
198  virtual Statistics* createAtomicStatistics(StatisticsType* type,
199  const char* textId,
200  int64_t numericId) = 0;
201 
203  virtual Statistics* findFirstStatisticsByType(StatisticsType* type) = 0;
204 
208  virtual const char* getName() = 0;
209 
213  virtual int64_t getId() = 0;
214 
215  private:
216  const StatisticsFactory& operator=(const StatisticsFactory&);
217 
218 }; // class
219 } // namespace statistics
220 } // namespace geode
221 } // namespace apache
222 
223 #endif // GEODE_STATISTICS_STATISTICSFACTORY_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
Instances of this interface provide methods that create instances of StatisticDescriptor and Statisti...
Definition: StatisticsFactory.hpp:54
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