VMware Tanzu GemFire Native C++ Reference 10.3.0
RegionEvent.hpp
Go to the documentation of this file.
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_REGIONEVENT_H_
21#define GEODE_REGIONEVENT_H_
22
23#include "CacheableKey.hpp"
24#include "Region.hpp"
25#include "internal/geode_globals.hpp"
26
30namespace apache {
31namespace geode {
32namespace client {
33
37class APACHE_GEODE_EXPORT RegionEvent {
38 protected:
39 const std::shared_ptr<Region> m_region;
40 const std::shared_ptr<Serializable>
42 const bool m_remoteOrigin;
44 public:
48 RegionEvent(const std::shared_ptr<Region>& region,
49 const std::shared_ptr<Serializable>& aCallbackArgument,
50 const bool remoteOrigin);
51
54
56 inline std::shared_ptr<Region> getRegion() const { return m_region; }
57
63 inline std::shared_ptr<Serializable> getCallbackArgument() const {
64 return m_callbackArgument;
65 }
66
68 inline bool remoteOrigin() const { return m_remoteOrigin; }
69
70 private:
71 // never implemented.
72 RegionEvent(const RegionEvent& other);
73 void operator=(const RegionEvent& other);
74};
75} // namespace client
76} // namespace geode
77} // namespace apache
78
79#endif // GEODE_REGIONEVENT_H_
Declares region events.
Definition: RegionEvent.hpp:37
RegionEvent(const std::shared_ptr< Region > &region, const std::shared_ptr< Serializable > &aCallbackArgument, const bool remoteOrigin)
Constructor, given the values.
std::shared_ptr< Region > getRegion() const
Return the region this event occurred in.
Definition: RegionEvent.hpp:56
bool remoteOrigin() const
If the event originated in a remote process, returns true.
Definition: RegionEvent.hpp:68
const std::shared_ptr< Serializable > m_callbackArgument
Callback argument for this event, if any.
Definition: RegionEvent.hpp:41
std::shared_ptr< Serializable > getCallbackArgument() const
Returns the callbackArgument passed to the method that generated this event.
Definition: RegionEvent.hpp:63
const bool m_remoteOrigin
True if from a remote process.
Definition: RegionEvent.hpp:42
const std::shared_ptr< Region > m_region
Region for this event.
Definition: RegionEvent.hpp:39

Apache Geode C++ Cache API Documentation