Apache Geode Native C++ Reference 1.15.0
CacheListener.hpp
Go to the documentation of this file.
1#pragma once
2
3#ifndef GEODE_CACHELISTENER_H_
4#define GEODE_CACHELISTENER_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
23#include <memory>
24
25#include "internal/geode_globals.hpp"
26
31namespace apache {
32namespace geode {
33namespace client {
34
35class EntryEvent;
36class Region;
37class RegionEvent;
38
79class APACHE_GEODE_EXPORT CacheListener {
83 public:
87 virtual ~CacheListener();
88
99 virtual void afterCreate(const EntryEvent& event);
100
111 virtual void afterUpdate(const EntryEvent& event);
112
119 virtual void afterInvalidate(const EntryEvent& event);
120
128 virtual void afterDestroy(const EntryEvent& event);
129
139 virtual void afterRegionInvalidate(const RegionEvent& event);
140
151 virtual void afterRegionDestroy(const RegionEvent& event);
152
163 virtual void afterRegionClear(const RegionEvent& event);
164
171 virtual void afterRegionLive(const RegionEvent& event);
172
188 virtual void close(Region& region);
197 virtual void afterRegionDisconnected(Region& region);
198
199 protected:
204
205 private:
206 // never implemented.
207 CacheListener(const CacheListener& other);
208 void operator=(const CacheListener& other);
209};
210} // namespace client
211} // namespace geode
212} // namespace apache
213
214#endif // GEODE_CACHELISTENER_H_
An application plug-in that can be installed on a region.
Definition: CacheListener.hpp:79
virtual void afterCreate(const EntryEvent &event)
Handles the event of a new key being added to a region.
virtual void afterInvalidate(const EntryEvent &event)
Handles the event of an entry's value being invalidated.
virtual void afterRegionLive(const RegionEvent &event)
Handles the event of a region being live.
virtual void afterUpdate(const EntryEvent &event)
Handles the event of an entry's value being modified in a region.
virtual void close(Region &region)
Called when the region containing this callback is destroyed, when the cache is closed.
virtual void afterRegionInvalidate(const RegionEvent &event)
Handles the event of a region being invalidated.
virtual void afterDestroy(const EntryEvent &event)
Handles the event of an entry being destroyed.
virtual void afterRegionDisconnected(Region &region)
Called when all the endpoints assosiated with region are down.
virtual void afterRegionClear(const RegionEvent &event)
Handles the event of a region being cleared.
virtual void afterRegionDestroy(const RegionEvent &event)
Handles the event of a region being destroyed.
virtual ~CacheListener()
public methods
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