Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
EntryView.h
1 /*
2  * Copyright (c) 2008-2015, 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 //
17 // Created by sancar koyunlu on 5/23/13.
18 
19 #ifndef HAZELCAST_MAP_SIMPLE_ENTRY_VIEW
20 #define HAZELCAST_MAP_SIMPLE_ENTRY_VIEW
21 
22 #include "hazelcast/client/map/DataEntryView.h"
23 #include "hazelcast/client/serialization/ObjectDataInput.h"
24 
25 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
26 #pragma warning(push)
27 #pragma warning(disable: 4251) //for dll export
28 #endif
29 
30 namespace hazelcast {
31  namespace client {
38  template<typename K, typename V>
39  class EntryView{
40  public:
41 
45  EntryView(const K &key, const V &value, const map::DataEntryView& rhs)
46  : key(key)
47  , value(value)
48  , cost (rhs.getCost())
49  , creationTime (rhs.getCreationTime())
50  , expirationTime (rhs.getExpirationTime())
51  , hits (rhs.getHits())
52  , lastAccessTime (rhs.getLastAccessTime())
53  , lastStoredTime (rhs.getLastStoredTime())
54  , lastUpdateTime (rhs.getLastUpdateTime())
55  , version (rhs.getVersion()) {
56 
57  };
61  K key;
65  V value;
69  long cost;
81  long hits;
97  long version;
98  };
99  }
100 }
101 
102 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
103 #pragma warning(pop)
104 #endif
105 
106 #endif //HAZELCAST_MAP_SIMPLE_ENTRY_VIEW
107 
long lastUpdateTime
last update time.
Definition: EntryView.h:93
long expirationTime
entry expiration time if ttl is defined.
Definition: EntryView.h:77
long lastStoredTime
last stored time.
Definition: EntryView.h:89
EntryView(const K &key, const V &value, const map::DataEntryView &rhs)
Constructor.
Definition: EntryView.h:45
long creationTime
entry creation time
Definition: EntryView.h:73
long hits
number of hits.
Definition: EntryView.h:81
K key
key
Definition: EntryView.h:57
EntryView represents a readonly view of a map entry.
Definition: EntryView.h:39
long version
version.
Definition: EntryView.h:97
V value
value
Definition: EntryView.h:65
long cost
memory cost of entry
Definition: EntryView.h:69
long lastAccessTime
last access time
Definition: EntryView.h:85