VMware GemFire Native C++ Reference  9.1
EntryEvent.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #ifndef GEODE_ENTRYEVENT_H_
4 #define GEODE_ENTRYEVENT_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 #include "geode_globals.hpp"
23 #include "geode_types.hpp"
24 #include "Region.hpp"
25 #include "CacheableKey.hpp"
26 #include "UserData.hpp"
27 
31 namespace apache {
32 namespace geode {
33 namespace client {
34 
38  protected:
47  public:
49  EntryEvent(const RegionPtr& region, const CacheableKeyPtr& key,
50  const CacheablePtr& oldValue, const CacheablePtr& newValue,
51  const UserDataPtr& aCallbackArgument, const bool remoteOrigin);
52 
54  virtual ~EntryEvent();
55 
57  EntryEvent();
58 
60  inline RegionPtr getRegion() const { return m_region; }
61 
63  inline CacheableKeyPtr getKey() const { return m_key; }
64 
69  inline CacheablePtr getOldValue() const { return m_oldValue; }
70 
75  inline CacheablePtr getNewValue() const { return m_newValue; }
76 
82  inline UserDataPtr getCallbackArgument() const { return m_callbackArgument; }
83 
85  inline bool remoteOrigin() const { return m_remoteOrigin; }
86 
87  private:
88  // never implemented.
89  EntryEvent(const EntryEvent& other);
90  void operator=(const EntryEvent& other);
91 };
92 } // namespace client
93 } // namespace geode
94 } // namespace apache
95 
96 #endif // GEODE_ENTRYEVENT_H_
CacheablePtr getOldValue() const
If the prior state of the entry was invalid, or non-existent/destroyed, then the old value will be NU...
Definition: EntryEvent.hpp:69
UserDataPtr getCallbackArgument() const
Returns the callbackArgument passed to the method that generated this event.
Definition: EntryEvent.hpp:82
Each enum represents a predefined RegionAttributes in a Cache.
Definition: Assert.hpp:31
CacheableKeyPtr m_key
Cacheable key.
Definition: EntryEvent.hpp:40
RegionPtr getRegion() const
Definition: EntryEvent.hpp:60
RegionPtr m_region
Region.
Definition: EntryEvent.hpp:39
#define CPPCACHE_EXPORT
Defines a Geode CPPCACHE export.
Definition: geode_base.hpp:58
bool m_remoteOrigin
True if from a remote (non-local) process.
Definition: EntryEvent.hpp:45
CacheablePtr m_oldValue
Old value.
Definition: EntryEvent.hpp:41
CacheableKeyPtr getKey() const
Definition: EntryEvent.hpp:63
This abstract base class is the base class of all user objects that have the shared capability of ref...
Definition: SharedBase.hpp:40
CacheablePtr getNewValue() const
If the event is a destroy or invalidate operation, then the new value will be NULLPTR.
Definition: EntryEvent.hpp:75
Represents an entry event affecting an entry, including its identity and the the circumstances of the...
Definition: EntryEvent.hpp:37
UserDataPtr m_callbackArgument
Callback argument for this event, if any.
Definition: EntryEvent.hpp:44
CacheablePtr m_newValue
New value.
Definition: EntryEvent.hpp:42
bool remoteOrigin() const
If the event originated in a remote process, returns true.
Definition: EntryEvent.hpp:85
This namespace contains all the Geode C++ API classes, enumerations and globals.

Pivotal GemFire C++ Cache API Documentation