VMware Tanzu GemFire Native C++ Reference  10.1.5
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 
27 namespace apache {
28 namespace geode {
29 namespace client {
30 
31 class EntryEvent;
32 class RegionEvent;
33 class Region;
87 class 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_
apache::geode::client::CacheWriter::beforeDestroy
virtual bool beforeDestroy(const EntryEvent &event)
Called before an entry is destroyed.
apache::geode::client::CacheWriter::beforeUpdate
virtual bool beforeUpdate(const EntryEvent &event)
Called before an entry is updated.
apache::geode::client::EntryEvent
Represents an entry event affecting an entry, including its identity and the the circumstances of the...
Definition: EntryEvent.hpp:44
apache::geode::client::RegionEvent
Declares region events.
Definition: RegionEvent.hpp:37
apache::geode::client::CacheWriter::close
virtual void close(Region &rp)
Called when the region containing this callback is destroyed, when the cache is closed.
apache::geode::client::CacheWriter::beforeRegionDestroy
virtual bool beforeRegionDestroy(const RegionEvent &event)
called before this region is destroyed
apache::geode::client::CacheWriter::beforeRegionClear
virtual bool beforeRegionClear(const RegionEvent &event)
called before this region is cleared
apache::geode::client::CacheWriter
An application plug-in that can be installed on the region.
Definition: CacheWriter.hpp:87
apache::geode::client::Region
This class manages subregions and cached data.
Definition: Region.hpp:95
apache::geode::client::CacheWriter::beforeCreate
virtual bool beforeCreate(const EntryEvent &event)
Called before an entry is created.

Apache Geode C++ Cache API Documentation