VMware VMware GemFire Native C++ Reference 10.4.3
Loading...
Searching...
No Matches
CacheLoader.hpp
Go to the documentation of this file.
1#pragma once
2
3#ifndef GEODE_CACHELOADER_H_
4#define GEODE_CACHELOADER_H_
5
6/*
7 * Licensed to the Apache Software Foundation (ASF) under one or more
8 * contributor license agreements. See the NOTICE file distributed with
9 * this work for additional information regarding copyright ownership.
10 * The ASF licenses this file to You under the Apache License, Version 2.0
11 * (the "License"); you may not use this file except in compliance with
12 * the License. You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
27#include "CacheableKey.hpp"
28#include "Serializable.hpp"
29#include "internal/geode_globals.hpp"
30
31namespace apache {
32namespace geode {
33namespace client {
34class Region;
35
55class APACHE_GEODE_EXPORT CacheLoader {
56 public:
57 virtual ~CacheLoader() = default;
58 CacheLoader(const CacheLoader& other) = delete;
59 void operator=(const CacheLoader& other) = delete;
60
74 virtual std::shared_ptr<Cacheable> load(
75 Region& rp, const std::shared_ptr<CacheableKey>& key,
76 const std::shared_ptr<Serializable>& aCallbackArgument) = 0;
77
93 virtual void close(Region& rp);
94
95 protected:
96 CacheLoader() = default;
97};
98} // namespace client
99} // namespace geode
100} // namespace apache
101
102#endif // GEODE_CACHELOADER_H_
An application plug-in that can be installed on a region.
Definition CacheLoader.hpp:55
virtual std::shared_ptr< Cacheable > load(Region &rp, const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< Serializable > &aCallbackArgument)=0
Loads a value.
virtual void close(Region &rp)
Called when the region containing this callback is destroyed, when the cache is closed.
This class manages subregions and cached data.
Definition Region.hpp:95

Apache Geode C++ Cache API Documentation