Hazelcast C++ Client
NearCacheStats.h
1 /*
2  * Copyright (c) 2008-2017, Hazelcast, Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef HAZELCAST_CLIENT_MONITOR_NEARCACHESTATS_H_
17 #define HAZELCAST_CLIENT_MONITOR_NEARCACHESTATS_H_
18 
19 #include <stdint.h>
20 #include <string>
21 
22 #include "hazelcast/util/HazelcastDll.h"
23 
24 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
25 #pragma warning(push)
26 #pragma warning(disable: 4251) //for dll export
27 #endif
28 
29 namespace hazelcast {
30  namespace client {
31  namespace monitor {
32  class HAZELCAST_API LocalInstanceStats {
33  public:
34  virtual ~LocalInstanceStats() {
35  }
36 
40  static const int64_t STAT_NOT_AVAILABLE;
41 
42  virtual int64_t getCreationTime() = 0;
43  };
44 
45  class HAZELCAST_API NearCacheStats : public LocalInstanceStats {
46  public:
52  //@Override
53  virtual int64_t getCreationTime() = 0;
54 
60  virtual int64_t getOwnedEntryCount() = 0;
61 
67  virtual int64_t getOwnedEntryMemoryCost() = 0;
68 
74  virtual int64_t getHits() = 0;
75 
81  virtual int64_t getMisses() = 0;
82 
88  virtual double getRatio() = 0;
89 
95  virtual int64_t getEvictions() = 0;
96 
102  virtual int64_t getExpirations() = 0;
103 
109  virtual int64_t getPersistenceCount() = 0;
110 
116  virtual int64_t getLastPersistenceTime() = 0;
117 
123  virtual int64_t getLastPersistenceDuration() = 0;
124 
130  virtual int64_t getLastPersistenceWrittenBytes() = 0;
131 
137  virtual int64_t getLastPersistenceKeyCount() = 0;
138 
144  virtual std::string getLastPersistenceFailure() = 0;
145 
146  virtual std::string toString() = 0;
147  };
148  }
149  }
150 }
151 
152 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
153 #pragma warning(pop)
154 #endif
155 
156 #endif /* HAZELCAST_CLIENT_MONITOR_NEARCACHESTATS_H_ */
157 
Definition: MapEntryView.h:32
Definition: NearCacheStats.h:45
Definition: NearCacheStats.h:32
static const int64_t STAT_NOT_AVAILABLE
Fill a stat value with this if it is not available.
Definition: NearCacheStats.h:40