Hazelcast C++ Client
Hazelcast C++ Client Library
Loading...
Searching...
No Matches
near_cache_stats.h
1/*
2 * Copyright (c) 2008-2025, 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
28namespace hazelcast {
29namespace client {
30namespace monitor {
31class HAZELCAST_API local_instance_stats
32{
33public:
34 virtual ~local_instance_stats() = default;
35
39 static const int64_t STAT_NOT_AVAILABLE;
40
41 virtual int64_t get_creation_time() = 0;
42};
43
44class HAZELCAST_API near_cache_stats : public local_instance_stats
45{
46public:
52 int64_t get_creation_time() = 0;
53
59 virtual int64_t get_owned_entry_count() = 0;
60
68 virtual int64_t get_owned_entry_memory_cost() = 0;
69
77 virtual int64_t get_hits() = 0;
78
84 virtual int64_t get_misses() = 0;
85
91 virtual double get_ratio() = 0;
92
99 virtual int64_t get_evictions() = 0;
100
108 virtual int64_t get_expirations() = 0;
109
117 virtual int64_t get_invalidations() = 0;
118
125 virtual int64_t get_persistence_count() = 0;
126
133 virtual int64_t get_last_persistence_time() = 0;
134
142 virtual int64_t get_last_persistence_duration() = 0;
143
151
159 virtual int64_t get_last_persistence_key_count() = 0;
160
167 virtual std::string get_last_persistence_failure() = 0;
168
169 virtual std::string to_string() = 0;
170};
171} // namespace monitor
172} // namespace client
173} // namespace hazelcast
174
175#if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
176#pragma warning(pop)
177#endif
static const int64_t STAT_NOT_AVAILABLE
Fill a stat value with this if it is not available.
virtual int64_t get_expirations()=0
Returns the number of TTL and max-idle expirations of Near Cache entries owned by this member.
virtual int64_t get_last_persistence_written_bytes()=0
Returns the written bytes of the last Near Cache key persistence (when the pre-load feature is enable...
virtual int64_t get_hits()=0
Returns the number of hits (reads) of Near Cache entries owned by this member.
virtual int64_t get_owned_entry_count()=0
Returns the number of Near Cache entries owned by this member.
virtual int64_t get_last_persistence_time()=0
Returns the timestamp of the last Near Cache key persistence (when the pre-load feature is enabled).
virtual int64_t get_misses()=0
Returns the number of misses of Near Cache entries owned by this member.
virtual std::string get_last_persistence_failure()=0
Returns the failure reason of the last Near Cache persistence (when the pre-load feature is enabled).
virtual int64_t get_invalidations()=0
Returns the number of invalidations of Near Cache entries owned by this member.
virtual int64_t get_evictions()=0
Returns the number of evictions of Near Cache entries owned by this member.
virtual int64_t get_last_persistence_key_count()=0
Returns the number of persisted keys of the last Near Cache key persistence (when the pre-load featur...
virtual double get_ratio()=0
Returns the hit/miss ratio of Near Cache entries owned by this member.
virtual int64_t get_owned_entry_memory_cost()=0
Returns memory cost (number of bytes) of Near Cache entries owned by this member.
virtual int64_t get_persistence_count()=0
Returns the number of Near Cache key persistences (when the pre-load feature is enabled).
int64_t get_creation_time()=0
Returns the creation time of this Near Cache on this member.
virtual int64_t get_last_persistence_duration()=0
Returns the duration in milliseconds of the last Near Cache key persistence (when the pre-load featur...