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
76 void operator = (
int i);
87 template <
typename K,
typename V>
94 std::auto_ptr<K> key, std::auto_ptr<V> value)
97 , eventType(eventType)
106 std::auto_ptr<K> key, std::auto_ptr<V> value,
107 std::auto_ptr<V> oldValue, std::auto_ptr<V> mergingValue)
110 , eventType(eventType)
114 , mergingValue(mergingValue) {
156 return oldValue.get();
222 return mergingValue.get();
246 return *mergingValue;
276 std::ostream &operator<< (std::ostream &out)
const {
277 out <<
"EntryEvent{entryEventType=" << eventType.
value << eventType <<
278 ", member=" << member <<
", name='" << name <<
"', key=" << *key;
280 out <<
", value=" << *value;
282 if (oldValue.get()) {
283 out <<
", oldValue=" << *oldValue;
285 if (mergingValue.get()) {
286 out <<
", mergingValue=" << *mergingValue;
293 EntryEventType eventType;
294 std::auto_ptr<K> key;
295 std::auto_ptr<V> value;
296 std::auto_ptr<V> oldValue;
297 std::auto_ptr<V> mergingValue;
304 template <
typename K,
typename V>
305 std::ostream &operator<<(std::ostream &out, const hazelcast::client::EntryEvent<K, V> &event) {
306 event.operator<<(out);
310 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
314 #endif //__EntryEvent_H_
const V * getOldValueObject() const
Returns the old value of the entry event.
Definition: EntryEvent.h:155
const Member & getMember() const
Returns the member fired this event.
Definition: EntryEvent.h:254
const V * getValueObject() const
Returns the value of the entry event.
Definition: EntryEvent.h:188
const K & getKey() const
Definition: EntryEvent.h:146
std::auto_ptr< V > releaseOldValue()
Releases the old value of the entry event.
Definition: EntryEvent.h:167
const K * getKeyObject() const
Returns the key of the entry event.
Definition: EntryEvent.h:123
const V & getMergingValue() const
Definition: EntryEvent.h:245
const V & getOldValue() const
Definition: EntryEvent.h:179
std::auto_ptr< K > releaseKey()
Releases the key of the entry event.
Definition: EntryEvent.h:134
Type
Type enum.
Definition: EntryEvent.h:41
std::string & getName() const
Returns the name of the map for this event.
Definition: EntryEvent.h:272
const V * getMergingValueObject() const
Returns the incoming merging value of the entry event.
Definition: EntryEvent.h:221
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:105
EntryEventType getEventType() const
Return the event type.
Definition: EntryEvent.h:263
EntryEvent(const std::string &name, const Member &member, EntryEventType eventType, std::auto_ptr< K > key, std::auto_ptr< V > value)
Constructor.
Definition: EntryEvent.h:93
Cluster member class.
Definition: Member.h:44
std::auto_ptr< V > releaseMergingValue() const
Releases the mergingValue of the entry event.
Definition: EntryEvent.h:233
Map Entry event.
Definition: EntryEvent.h:88
Type value
Type value.
Definition: EntryEvent.h:56
Type of entry event.
Definition: EntryEvent.h:36
const V & getValue() const
Definition: EntryEvent.h:212
std::auto_ptr< V > releaseValue()
Releases the value of the entry event.
Definition: EntryEvent.h:200