20 #ifndef HAZELCAST_ENTRY_EVENT
21 #define HAZELCAST_ENTRY_EVENT
23 #include "hazelcast/client/Member.h"
24 #include <boost/shared_ptr.hpp>
26 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
28 #pragma warning(disable: 4251) //for dll export
76 void operator = (
int i);
87 template <
typename K,
typename V>
94 boost::shared_ptr<K> key, boost::shared_ptr<V> value)
97 , eventType(eventType)
107 boost::shared_ptr<K> key, boost::shared_ptr<V> value,
108 boost::shared_ptr<V> oldValue, boost::shared_ptr<V> mergingValue)
111 , eventType(eventType)
115 , mergingValue(mergingValue) {
152 return *mergingValue;
182 std::ostream &operator<< (std::ostream &out)
const {
183 out <<
"EntryEvent{entryEventType=" << eventType.
value << eventType <<
184 ", member=" << member <<
", name='" << name <<
"', key=" << *key;
186 out <<
", value=" << *value;
188 if (oldValue.get()) {
189 out <<
", oldValue=" << *oldValue;
191 if (mergingValue.get()) {
192 out <<
", mergingValue=" << *mergingValue;
199 EntryEventType eventType;
200 boost::shared_ptr<K> key;
201 boost::shared_ptr<V> value;
202 boost::shared_ptr<V> oldValue;
203 boost::shared_ptr<V> mergingValue;
209 template <
typename K,
typename V>
210 std::ostream &operator<<(std::ostream &out, const hazelcast::client::EntryEvent<K, V> &event) {
211 event.operator<<(out);
215 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
219 #endif //__EntryEvent_H_
EntryEvent(const std::string &name, const Member &member, EntryEventType eventType, boost::shared_ptr< K > key, boost::shared_ptr< V > value, boost::shared_ptr< V > oldValue, boost::shared_ptr< V > mergingValue)
Constructor.
Definition: EntryEvent.h:106
const K & getKey() const
Returns the key of the entry event.
Definition: EntryEvent.h:124
const V & getMergingValue() const
Returns the incoming merging value of the entry event.
Definition: EntryEvent.h:151
const V & getOldValue() const
Returns the old value of the entry event.
Definition: EntryEvent.h:133
Type
Type enum.
Definition: EntryEvent.h:41
EntryEventType getEventType() const
Return the event type.
Definition: EntryEvent.h:169
Member getMember() const
Returns the member fired this event.
Definition: EntryEvent.h:160
Cluster member class.
Definition: Member.h:44
Map Entry event.
Definition: EntryEvent.h:88
Type value
Type value.
Definition: EntryEvent.h:56
EntryEvent(const std::string &name, const Member &member, EntryEventType eventType, boost::shared_ptr< K > key, boost::shared_ptr< V > value)
Constructor.
Definition: EntryEvent.h:93
Type of entry event.
Definition: EntryEvent.h:36
std::string getName() const
Returns the name of the map for this event.
Definition: EntryEvent.h:178
const V & getValue() const
Returns the value of the entry event.
Definition: EntryEvent.h:142