Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
EntryListener.h
1 /*
2  * Copyright (c) 2008-2015, Hazelcast, Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 //
17 // Created by sancar koyunlu on 04/09/14.
18 //
19 
20 
21 #ifndef HAZELCAST_EntryListener
22 #define HAZELCAST_EntryListener
23 
24 #include "hazelcast/client/EntryEvent.h"
25 
26 namespace hazelcast {
27  namespace client {
28  class MapEvent;
29 
44  template<typename K, typename V>
45  class EntryListener {
46  public:
47  virtual ~EntryListener() {
48 
49  }
50 
56  virtual void entryAdded(const EntryEvent<K, V>& event) = 0;
57 
63  virtual void entryRemoved(const EntryEvent<K, V>& event) = 0;
64 
70  virtual void entryUpdated(const EntryEvent<K, V>& event) = 0;
71 
77  virtual void entryEvicted(const EntryEvent<K, V>& event) = 0;
78 
84  virtual void entryExpired(const EntryEvent<K, V>& event) = 0;
85 
91  virtual void entryMerged(const EntryEvent<K, V>& event) = 0;
92 
98  virtual void mapEvicted(const MapEvent& event) = 0;
99 
103  virtual void mapCleared(const MapEvent& event) = 0;
104 
105  };
106  }
107 }
108 
109 
110 #endif //HAZELCAST_EntryListener
virtual void mapEvicted(const MapEvent &event)=0
Invoked when all entries evicted by IMap#evictAll().
virtual void entryAdded(const EntryEvent< K, V > &event)=0
Invoked when an entry is added.
Map Entry listener to get notified when a map entry is added, removed, updated or evicted...
Definition: EntryListener.h:45
virtual void entryEvicted(const EntryEvent< K, V > &event)=0
Invoked when an entry is evicted.
virtual void entryMerged(const EntryEvent< K, V > &event)=0
Invoked after WAN replicated entry is merged.
virtual void entryExpired(const EntryEvent< K, V > &event)=0
Invoked upon expiration of an entry.
Map events common contract.
Definition: MapEvent.h:39
virtual void mapCleared(const MapEvent &event)=0
Invoked when all entries are removed by IMap#clear().
Map Entry event.
Definition: EntryEvent.h:88
virtual void entryUpdated(const EntryEvent< K, V > &event)=0
Invoked when an entry is removed.
virtual void entryRemoved(const EntryEvent< K, V > &event)=0
Invoked when an entry is removed.