Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
EntryAdapter.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_EntryAdapter
22 #define HAZELCAST_EntryAdapter
23 
24 
25 #include "hazelcast/client/EntryEvent.h"
26 #include "hazelcast/client/EntryListener.h"
27 
28 namespace hazelcast {
29  namespace client {
30  class MapEvent;
31 
39  template<typename K, typename V>
40  class EntryAdapter : public EntryListener<K, V> {
41  public:
42  virtual ~EntryAdapter() {
43 
44  }
45 
46  virtual void entryAdded(const EntryEvent<K, V>& event) {
47 
48  }
49 
50  virtual void entryRemoved(const EntryEvent<K, V>& event) {
51 
52  }
53 
54  virtual void entryUpdated(const EntryEvent<K, V>& event) {
55 
56  }
57 
58  virtual void entryEvicted(const EntryEvent<K, V>& event) {
59 
60  }
61 
62 
63  virtual void entryExpired(const EntryEvent<K, V>& event){
64 
65  }
66 
67  virtual void entryMerged(const EntryEvent<K, V>& event){
68 
69  }
70 
71  virtual void mapEvicted(const MapEvent& event) {
72 
73  }
74 
75  virtual void mapCleared(const MapEvent& event) {
76 
77  }
78  };
79  }
80 }
81 
82 
83 #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:40
virtual void mapEvicted(const MapEvent &event)
Invoked when all entries evicted by IMap#evictAll().
Definition: EntryAdapter.h:71
virtual void entryRemoved(const EntryEvent< K, V > &event)
Invoked when an entry is removed.
Definition: EntryAdapter.h:50
virtual void mapCleared(const MapEvent &event)
Invoked when all entries are removed by IMap#clear().
Definition: EntryAdapter.h:75
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:67
virtual void entryEvicted(const EntryEvent< K, V > &event)
Invoked when an entry is evicted.
Definition: EntryAdapter.h:58
virtual void entryExpired(const EntryEvent< K, V > &event)
Invoked upon expiration of an entry.
Definition: EntryAdapter.h:63
Map Entry event.
Definition: EntryEvent.h:89
virtual void entryAdded(const EntryEvent< K, V > &event)
Invoked when an entry is added.
Definition: EntryAdapter.h:46
virtual void entryUpdated(const EntryEvent< K, V > &event)
Invoked when an entry is removed.
Definition: EntryAdapter.h:54