Hazelcast C++ Client
 All Classes Functions Variables Enumerations Enumerator Pages
EntryAdapter.h
1 /*
2  * Copyright (c) 2008-2017, 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 #ifndef HAZELCAST_EntryAdapter
20 #define HAZELCAST_EntryAdapter
21 
22 #include "hazelcast/client/EntryEvent.h"
23 #include "hazelcast/client/EntryListener.h"
24 
25 namespace hazelcast {
26  namespace client {
27  class MapEvent;
28 
36  template<typename K, typename V>
37  class EntryAdapter : public EntryListener<K, V> {
38  public:
39  virtual ~EntryAdapter() {
40 
41  }
42 
43  virtual void entryAdded(const EntryEvent<K, V>& event) {
44 
45  }
46 
47  virtual void entryRemoved(const EntryEvent<K, V>& event) {
48 
49  }
50 
51  virtual void entryUpdated(const EntryEvent<K, V>& event) {
52 
53  }
54 
55  virtual void entryEvicted(const EntryEvent<K, V>& event) {
56 
57  }
58 
59 
60  virtual void entryExpired(const EntryEvent<K, V>& event){
61 
62  }
63 
64  virtual void entryMerged(const EntryEvent<K, V>& event){
65 
66  }
67 
68  virtual void mapEvicted(const MapEvent& event) {
69 
70  }
71 
72  virtual void mapCleared(const MapEvent& event) {
73 
74  }
75  };
76  }
77 }
78 
79 
80 #endif //HAZELCAST_EntryAdapter
Map Entry listener to get notified when a map entry is added, removed, updated or evicted...
Definition: EntryListener.h:45
Adapter for EntryListener.
Definition: EntryAdapter.h:37
virtual void mapEvicted(const MapEvent &event)
Invoked when all entries evicted by IMap#evictAll().
Definition: EntryAdapter.h:68
virtual void entryRemoved(const EntryEvent< K, V > &event)
Invoked when an entry is removed.
Definition: EntryAdapter.h:47
virtual void mapCleared(const MapEvent &event)
Invoked when all entries are removed by IMap#clear().
Definition: EntryAdapter.h:72
Map events common contract.
Definition: MapEvent.h:39
virtual void entryMerged(const EntryEvent< K, V > &event)
Invoked after WAN replicated entry is merged.
Definition: EntryAdapter.h:64
virtual void entryEvicted(const EntryEvent< K, V > &event)
Invoked when an entry is evicted.
Definition: EntryAdapter.h:55
virtual void entryExpired(const EntryEvent< K, V > &event)
Invoked upon expiration of an entry.
Definition: EntryAdapter.h:60
Map Entry event.
Definition: EntryEvent.h:89
virtual void entryAdded(const EntryEvent< K, V > &event)
Invoked when an entry is added.
Definition: EntryAdapter.h:43
virtual void entryUpdated(const EntryEvent< K, V > &event)
Invoked when an entry is removed.
Definition: EntryAdapter.h:51