Hazelcast C++ Client
 All Classes Functions Variables Enumerations Enumerator Pages
DataStructureAdapter.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 #ifndef HAZELCAST_CLIENT_INTERNAL_ADAPTER_DATASTRUCTUREADAPTER_H_
17 #define HAZELCAST_CLIENT_INTERNAL_ADAPTER_DATASTRUCTUREADAPTER_H_
18 
19 #include <assert.h>
20 #include <set>
21 #include <map>
22 
23 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
24 #pragma warning(push)
25 #pragma warning(disable: 4251) //for dll export
26 #endif
27 
28 namespace hazelcast {
29  namespace client {
30  namespace internal {
31  namespace adapter {
36  template <typename K, typename V>
38  public:
39  virtual ~DataStructureAdapter() {
40  }
41 
42  virtual void clear() {
43  assert(0);
44  }
45 
46  virtual void set(const K &key, const V &value) {
47  assert(0);
48  }
49 
50  virtual boost::shared_ptr<V> put(const K &key, const V &value) {
51  assert(0);
52  return boost::shared_ptr<V>();
53  }
54 
55  virtual boost::shared_ptr<V> get(const K &key) {
56  assert(0);
57  return boost::shared_ptr<V>();
58  }
59 
60 /*
61  virtual connection::CallFuture getAsync(const K &key) {
62  }
63 */
64 
65  virtual void putAll(const std::map<K, V> entries) {
66  assert(0);
67  }
68 
69  virtual std::map<K, V> getAll(const std::set<K> &keys) {
70  assert(0);
71  return std::map<K, V>();
72  }
73 
74  virtual void remove(const K &key) {
75  assert(0);
76  }
77 
78  virtual bool containsKey(const K &key) const {
79  assert(0);
80  return false;
81  }
82  };
83  }
84  }
85  }
86 }
87 
88 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
89 #pragma warning(pop)
90 #endif
91 
92 #endif /* HAZELCAST_CLIENT_INTERNAL_ADAPTER_DATASTRUCTUREADAPTER_H_ */
93 
Abstracts the Hazelcast data structures with Near Cache support for the Near Cache usage...
Definition: DataStructureAdapter.h:37