Hazelcast C++ Client
EvictableStore.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_EVICTION_EVICTABLESTORE_H_
17 #define HAZELCAST_CLIENT_INTERNAL_EVICTION_EVICTABLESTORE_H_
18 
19 #include <assert.h>
20 #include <vector>
21 #include <boost/shared_ptr.hpp>
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 eviction {
32  template<typename MAPKEY, typename MAPVALUE, typename A, typename E>
34 
35  template<typename A, typename E>
37 
45  template<typename MAPKEY, typename MAPVALUE, typename A, typename E>
47  public:
48  virtual ~EvictableStore() { }
49 
59  virtual int evict(
60  std::vector<boost::shared_ptr<EvictionCandidate<MAPKEY, MAPVALUE, A, E> > > *evictionCandidates,
61  EvictionListener<A, E> *evictionListener) {
62  assert(0);
63  return 0;
64  }
65  };
66  }
67  }
68  }
69 };
70 
71 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
72 #pragma warning(pop)
73 #endif
74 
75 #endif /* HAZELCAST_CLIENT_INTERNAL_EVICTION_EVICTABLESTORE_H_ */
Interface for store implementations that holds Evictable entries to evict.
Definition: EvictableStore.h:46
Interface for entries, records or whatever that can be evicted via its accessor (key or id)...
Definition: EvictableStore.h:36
Interface for entries, records or whatever that can be evictable via its accessor (key or id)...
Definition: EvictableStore.h:33
virtual int evict(std::vector< boost::shared_ptr< EvictionCandidate< MAPKEY, MAPVALUE, A, E > > > *evictionCandidates, EvictionListener< A, E > *evictionListener)
The evict method is called by the EvictionStrategy to eventually evict, by the policy, selected candidates from the internal data structures.
Definition: EvictableStore.h:59
Definition: MapEntryView.h:32