Hazelcast C++ Client
Hazelcast C++ Client Library
entry_view.h
1 /*
2  * Copyright (c) 2008-2022, 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 
20 #include "hazelcast/client/map/data_entry_view.h"
21 #include "hazelcast/client/serialization/serialization.h"
22 
23 namespace hazelcast {
24 namespace client {
31 template<typename K, typename V>
33 {
34 public:
35  entry_view(K key,
36  V value,
37  int64_t cost,
38  int64_t creationTime,
39  int64_t expirationTime,
40  int64_t hits,
41  int64_t lastAccessTime,
42  int64_t lastStoredTime,
43  int64_t lastUpdateTime,
44  int64_t version)
45  : key(std::move(key))
46  , value(std::move(value))
47  , cost(cost)
48  , creation_time(creationTime)
49  , expiration_time(expirationTime)
50  , hits(hits)
51  , last_access_time(lastAccessTime)
52  , last_stored_time(lastStoredTime)
53  , last_update_time(lastUpdateTime)
54  , version(version)
55  {}
56 
60  K key;
64  V value;
68  int64_t cost;
72  int64_t creation_time;
76  int64_t expiration_time;
80  int64_t hits;
96  int64_t version;
97 };
98 } // namespace client
99 } // namespace hazelcast
EntryView represents a readonly view of a map entry.
Definition: entry_view.h:33
int64_t hits
number of hits.
Definition: entry_view.h:80
int64_t creation_time
entry creation time
Definition: entry_view.h:72
int64_t expiration_time
entry expiration time if ttl is defined.
Definition: entry_view.h:76
int64_t last_stored_time
last stored time.
Definition: entry_view.h:88
int64_t last_update_time
last update time.
Definition: entry_view.h:92
int64_t last_access_time
last access time
Definition: entry_view.h:84
int64_t cost
memory cost of entry
Definition: entry_view.h:68