VMware Tanzu GemFire Native C++ Reference 10.2.7
RegionEntry.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18#pragma once
19
20#ifndef GEODE_REGIONENTRY_H_
21#define GEODE_REGIONENTRY_H_
22
23#include "CacheStatistics.hpp"
24#include "CacheableKey.hpp"
25#include "internal/geode_globals.hpp"
26
31namespace apache {
32namespace geode {
33namespace client {
34
35class RegionInternal;
36class Region;
37
51class APACHE_GEODE_EXPORT RegionEntry {
52 public:
57 RegionEntry(const std::shared_ptr<Region>& region,
58 const std::shared_ptr<CacheableKey>& key,
59 const std::shared_ptr<Cacheable>& value);
60 virtual ~RegionEntry() noexcept;
61
66 std::shared_ptr<CacheableKey> getKey();
67
73 std::shared_ptr<Cacheable> getValue();
74
79 std::shared_ptr<Region> getRegion();
80
87 std::shared_ptr<CacheStatistics> getStatistics();
88
96 bool isDestroyed() const;
97
98 private:
99 std::shared_ptr<Region> m_region;
100 std::shared_ptr<CacheableKey> m_key;
101 std::shared_ptr<Cacheable> m_value;
102 std::shared_ptr<CacheStatistics> m_statistics;
103 bool m_destroyed;
104 friend class RegionInternal;
105};
106} // namespace client
107} // namespace geode
108} // namespace apache
109
110#endif // GEODE_REGIONENTRY_H_
Represents a cacheable key.
Definition: CacheableKey.hpp:40
Defines common statistical information for both the region and its entries.
Definition: CacheStatistics.hpp:48
This class manages subregions and cached data.
Definition: Region.hpp:95
An object in a Region that represents an entry, i.e., a key-value pair.
Definition: RegionEntry.hpp:51
RegionEntry(const std::shared_ptr< Region > &region, const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< Cacheable > &value)
constructors created by region
This base class is the superclass of all user objects in the cache that can be serialized.
Definition: Serializable.hpp:53

Apache Geode C++ Cache API Documentation