VMware Tanzu GemFire Native C++ Reference  10.1.5
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 
31 namespace apache {
32 namespace geode {
33 namespace client {
34 
35 class EntryEvent;
36 class Region;
37 class RegionEvent;
38 
79 class 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_
apache::geode::client::CacheListener::afterRegionClear
virtual void afterRegionClear(const RegionEvent &event)
Handles the event of a region being cleared.
apache::geode::client::CacheListener::afterInvalidate
virtual void afterInvalidate(const EntryEvent &event)
Handles the event of an entry's value being invalidated.
apache::geode::client::CacheListener::afterDestroy
virtual void afterDestroy(const EntryEvent &event)
Handles the event of an entry being destroyed.
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::CacheListener
An application plug-in that can be installed on a region.
Definition: CacheListener.hpp:79
apache::geode::client::RegionEvent
Declares region events.
Definition: RegionEvent.hpp:37
apache::geode::client::CacheListener::close
virtual void close(Region &region)
Called when the region containing this callback is destroyed, when the cache is closed.
apache::geode::client::CacheListener::afterRegionDisconnected
virtual void afterRegionDisconnected(Region &region)
Called when all the endpoints assosiated with region are down.
apache::geode::client::CacheListener::afterRegionDestroy
virtual void afterRegionDestroy(const RegionEvent &event)
Handles the event of a region being destroyed.
apache::geode::client::CacheListener::afterRegionLive
virtual void afterRegionLive(const RegionEvent &event)
Handles the event of a region being live.
apache::geode::client::Region
This class manages subregions and cached data.
Definition: Region.hpp:95
apache::geode::client::CacheListener::afterCreate
virtual void afterCreate(const EntryEvent &event)
Handles the event of a new key being added to a region.
apache::geode::client::CacheListener::~CacheListener
virtual ~CacheListener()
public methods
apache::geode::client::CacheListener::CacheListener
CacheListener()
constructors
apache::geode::client::CacheListener::afterUpdate
virtual void afterUpdate(const EntryEvent &event)
Handles the event of an entry's value being modified in a region.
apache::geode::client::CacheListener::afterRegionInvalidate
virtual void afterRegionInvalidate(const RegionEvent &event)
Handles the event of a region being invalidated.

Apache Geode C++ Cache API Documentation