Hazelcast C++ Client
near_cache_stats.h
1 /*
2  * Copyright (c) 2008-2021, 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 #pragma once
17 
18 #include <stdint.h>
19 #include <string>
20 
21 #include "hazelcast/util/export.h"
22 
23 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
24 #pragma warning(push)
25 #pragma warning(disable: 4251) //for dll export
26 #endif
27 
28 namespace hazelcast {
29  namespace client {
30  namespace monitor {
31  class HAZELCAST_API local_instance_stats {
32  public:
33  virtual ~local_instance_stats() = default;
34 
38  static const int64_t STAT_NOT_AVAILABLE;
39 
40  virtual int64_t get_creation_time() = 0;
41  };
42 
43  class HAZELCAST_API near_cache_stats : public local_instance_stats {
44  public:
50  int64_t get_creation_time() = 0;
51 
57  virtual int64_t get_owned_entry_count() = 0;
58 
64  virtual int64_t get_owned_entry_memory_cost() = 0;
65 
71  virtual int64_t get_hits() = 0;
72 
78  virtual int64_t get_misses() = 0;
79 
85  virtual double get_ratio() = 0;
86 
92  virtual int64_t get_evictions() = 0;
93 
99  virtual int64_t get_expirations() = 0;
100 
106  virtual int64_t get_invalidations() = 0;
107 
113  virtual int64_t get_persistence_count() = 0;
114 
120  virtual int64_t get_last_persistence_time() = 0;
121 
127  virtual int64_t get_last_persistence_duration() = 0;
128 
134  virtual int64_t get_last_persistence_written_bytes() = 0;
135 
141  virtual int64_t get_last_persistence_key_count() = 0;
142 
148  virtual std::string get_last_persistence_failure() = 0;
149 
150  virtual std::string to_string() = 0;
151  };
152  }
153  }
154 }
155 
156 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
157 #pragma warning(pop)
158 #endif
159 
160 
161 
Definition: near_cache_stats.h:43
Definition: near_cache_stats.h:31
static const int64_t STAT_NOT_AVAILABLE
Fill a stat value with this if it is not available.
Definition: near_cache_stats.h:38
Definition: address.h:30