Apache Geode Native C++ Reference 1.15.0
CacheWriter.hpp
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_CACHEWRITER_H_
21#define GEODE_CACHEWRITER_H_
22
23#include <memory>
24
25#include "internal/geode_globals.hpp"
26
27namespace apache {
28namespace geode {
29namespace client {
30
31class EntryEvent;
32class RegionEvent;
33class Region;
87class APACHE_GEODE_EXPORT CacheWriter {
88 public:
105 virtual bool beforeUpdate(const EntryEvent& event);
106
124 virtual bool beforeCreate(const EntryEvent& event);
125
138 virtual bool beforeDestroy(const EntryEvent& event);
139
147 virtual bool beforeRegionClear(const RegionEvent& event);
148
156 virtual bool beforeRegionDestroy(const RegionEvent& event);
157
173 virtual void close(Region& rp);
174
175 virtual ~CacheWriter();
176
177 protected:
178 CacheWriter();
179
180 private:
181 // never implemented.
182 CacheWriter(const CacheWriter& other);
183 void operator=(const CacheWriter& other);
184};
185} // namespace client
186} // namespace geode
187} // namespace apache
188
189#endif // GEODE_CACHEWRITER_H_
An application plug-in that can be installed on the region.
Definition: CacheWriter.hpp:87
virtual bool beforeRegionClear(const RegionEvent &event)
called before this region is cleared
virtual bool beforeUpdate(const EntryEvent &event)
Called before an entry is updated.
virtual bool beforeDestroy(const EntryEvent &event)
Called before an entry is destroyed.
virtual void close(Region &rp)
Called when the region containing this callback is destroyed, when the cache is closed.
virtual bool beforeCreate(const EntryEvent &event)
Called before an entry is created.
virtual bool beforeRegionDestroy(const RegionEvent &event)
called before this region is destroyed
Represents an entry event affecting an entry, including its identity and the the circumstances of the...
Definition: EntryEvent.hpp:44
This class manages subregions and cached data.
Definition: Region.hpp:95
Declares region events.
Definition: RegionEvent.hpp:37

Apache Geode C++ Cache API Documentation