20#ifndef GEODE_ENTRYEVENT_H_
21#define GEODE_ENTRYEVENT_H_
27#include "geode/Serializable.hpp"
28#include "internal/geode_globals.hpp"
47 std::shared_ptr<CacheableKey>
m_key;
50 std::shared_ptr<Serializable>
57 const std::shared_ptr<CacheableKey>& key,
58 const std::shared_ptr<Cacheable>& oldValue,
59 const std::shared_ptr<Cacheable>& newValue,
60 const std::shared_ptr<Serializable>& aCallbackArgument,
61 const bool remoteOrigin);
70 inline std::shared_ptr<Region>
getRegion()
const {
return m_region; }
73 inline std::shared_ptr<CacheableKey>
getKey()
const {
return m_key; }
79 inline std::shared_ptr<Cacheable>
getOldValue()
const {
return m_oldValue; }
85 inline std::shared_ptr<Cacheable>
getNewValue()
const {
return m_newValue; }
93 return m_callbackArgument;
Represents an entry event affecting an entry, including its identity and the the circumstances of the...
Definition: EntryEvent.hpp:44
EntryEvent(const std::shared_ptr< Region > ®ion, const std::shared_ptr< CacheableKey > &key, const std::shared_ptr< Cacheable > &oldValue, const std::shared_ptr< Cacheable > &newValue, const std::shared_ptr< Serializable > &aCallbackArgument, const bool remoteOrigin)
Constructor, given all values.
bool remoteOrigin() const
If the event originated in a remote process, returns true.
Definition: EntryEvent.hpp:97
bool m_remoteOrigin
True if from a remote (non-local) process.
Definition: EntryEvent.hpp:52
std::shared_ptr< Cacheable > 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:79
std::shared_ptr< Cacheable > m_oldValue
Old value.
Definition: EntryEvent.hpp:48
std::shared_ptr< Serializable > getCallbackArgument() const
Returns the callbackArgument passed to the method that generated this event.
Definition: EntryEvent.hpp:92
std::shared_ptr< Cacheable > m_newValue
New value.
Definition: EntryEvent.hpp:49
virtual ~EntryEvent()
Destructor.
std::shared_ptr< CacheableKey > m_key
Cacheable key.
Definition: EntryEvent.hpp:47
std::shared_ptr< CacheableKey > getKey() const
Definition: EntryEvent.hpp:73
std::shared_ptr< Region > getRegion() const
Definition: EntryEvent.hpp:70
std::shared_ptr< Serializable > m_callbackArgument
Callback argument for this event, if any.
Definition: EntryEvent.hpp:51
std::shared_ptr< Cacheable > getNewValue() const
If the event is a destroy or invalidate operation, then the new value will be nullptr.
Definition: EntryEvent.hpp:85
std::shared_ptr< Region > m_region
Region.
Definition: EntryEvent.hpp:46