20 #ifndef HAZELCAST_ENTRY_EVENT
21 #define HAZELCAST_ENTRY_EVENT
24 #include "hazelcast/client/Member.h"
26 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
28 #pragma warning(disable: 4251) //for dll export
51 INVALIDATION = 1 << 8,
77 void operator = (
int i);
88 template <
typename K,
typename V>
95 std::auto_ptr<K> key, std::auto_ptr<V> value)
98 , eventType(eventType)
107 std::auto_ptr<K> key, std::auto_ptr<V> value,
108 std::auto_ptr<V> oldValue, std::auto_ptr<V> mergingValue)
111 , eventType(eventType)
115 , mergingValue(mergingValue) {
157 return oldValue.get();
223 return mergingValue.get();
247 return *mergingValue;
277 std::ostream &operator<< (std::ostream &out)
const {
278 out <<
"EntryEvent{entryEventType=" << eventType.
value << eventType <<
279 ", member=" << member <<
", name='" << name <<
"', key=" << *key;
281 out <<
", value=" << *value;
283 if (oldValue.get()) {
284 out <<
", oldValue=" << *oldValue;
286 if (mergingValue.get()) {
287 out <<
", mergingValue=" << *mergingValue;
294 EntryEventType eventType;
295 std::auto_ptr<K> key;
296 std::auto_ptr<V> value;
297 std::auto_ptr<V> oldValue;
298 std::auto_ptr<V> mergingValue;
305 template <
typename K,
typename V>
306 std::ostream &operator<<(std::ostream &out, const hazelcast::client::EntryEvent<K, V> &event) {
307 event.operator<<(out);
311 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
315 #endif //__EntryEvent_H_
const V * getOldValueObject() const
Returns the old value of the entry event.
Definition: EntryEvent.h:156
const Member & getMember() const
Returns the member fired this event.
Definition: EntryEvent.h:255
const V * getValueObject() const
Returns the value of the entry event.
Definition: EntryEvent.h:189
const K & getKey() const
Definition: EntryEvent.h:147
std::auto_ptr< V > releaseOldValue()
Releases the old value of the entry event.
Definition: EntryEvent.h:168
const K * getKeyObject() const
Returns the key of the entry event.
Definition: EntryEvent.h:124
const V & getMergingValue() const
Definition: EntryEvent.h:246
const V & getOldValue() const
Definition: EntryEvent.h:180
std::auto_ptr< K > releaseKey()
Releases the key of the entry event.
Definition: EntryEvent.h:135
Type
Type enum.
Definition: EntryEvent.h:41
std::string & getName() const
Returns the name of the map for this event.
Definition: EntryEvent.h:273
const V * getMergingValueObject() const
Returns the incoming merging value of the entry event.
Definition: EntryEvent.h:222
EntryEvent(const std::string &name, const Member &member, EntryEventType eventType, std::auto_ptr< K > key, std::auto_ptr< V > value, std::auto_ptr< V > oldValue, std::auto_ptr< V > mergingValue)
Constructor.
Definition: EntryEvent.h:106
EntryEventType getEventType() const
Return the event type.
Definition: EntryEvent.h:264
EntryEvent(const std::string &name, const Member &member, EntryEventType eventType, std::auto_ptr< K > key, std::auto_ptr< V > value)
Constructor.
Definition: EntryEvent.h:94
Cluster member class.
Definition: Member.h:44
std::auto_ptr< V > releaseMergingValue() const
Releases the mergingValue of the entry event.
Definition: EntryEvent.h:234
Map Entry event.
Definition: EntryEvent.h:89
Definition: MapEntryView.h:32
Type value
Type value.
Definition: EntryEvent.h:57
Type of entry event.
Definition: EntryEvent.h:36
const V & getValue() const
Definition: EntryEvent.h:213
std::auto_ptr< V > releaseValue()
Releases the value of the entry event.
Definition: EntryEvent.h:201