16 #ifndef HAZELCAST_CLIENT_INTERNAL_NEARCACHE_NEARCACHE_H_
17 #define HAZELCAST_CLIENT_INTERNAL_NEARCACHE_NEARCACHE_H_
22 #include <boost/shared_ptr.hpp>
24 #include "hazelcast/client/config/InMemoryFormat.h"
25 #include "hazelcast/util/HazelcastDll.h"
26 #include "hazelcast/util/Clearable.h"
27 #include "hazelcast/util/Destroyable.h"
28 #include "hazelcast/client/spi/InitializingObject.h"
30 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
32 #pragma warning(disable: 4251) //for dll export
37 namespace serialization {
49 template<
typename K,
typename V>
50 class DataStructureAdapter;
55 :
public spi::InitializingObject,
public util::Clearable,
public util::Destroyable {
67 template<
typename K,
typename V>
97 virtual const std::string &
getName()
const {
99 return *(
new std::string(
""));
108 virtual boost::shared_ptr<V>
get(
const boost::shared_ptr<K> &key) {
110 return boost::shared_ptr<V>();
119 virtual void put(
const boost::shared_ptr<K> &key,
const boost::shared_ptr<V> &value) {
129 virtual void put(
const boost::shared_ptr<K> &key,
130 const boost::shared_ptr<serialization::pimpl::Data> &value) {
139 virtual bool remove(
const boost::shared_ptr<K> &key) {
159 return config::BINARY;
180 template<
typename K,
typename V>
181 boost::shared_ptr<V> NearCache<K, V>::NULL_OBJECT = boost::shared_ptr<V>(
new V());
187 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
static const int DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS
Default expiration task delay time as seconds.
Definition: NearCache.h:90
virtual const std::string & getName() const
Gets the name of the this com.hazelcast.cache.impl.nearcache.NearCache instance.
Definition: NearCache.h:97
virtual void put(const boost::shared_ptr< K > &key, const boost::shared_ptr< serialization::pimpl::Data > &value)
Puts (associates) a value with the given key.
Definition: NearCache.h:129
Definition: NearCache.h:54
virtual const config::InMemoryFormat getInMemoryFormat() const
Gets the com.hazelcast.config.InMemoryFormat of the storage for internal records. ...
Definition: NearCache.h:157
virtual int size() const
Gets the count of stored records.
Definition: NearCache.h:174
NearCache is the contract point to store keys and values in underlying com.hazelcast.cache.impl.nearcache.NearCacheRecordStore.
Definition: NearCache.h:68
static const int DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS
Default expiration task initial delay time as seconds.
Definition: NearCache.h:85
virtual monitor::NearCacheStats & getNearCacheStats()=0
Get the com.hazelcast.monitor.NearCacheStats instance to monitor this store.
static boost::shared_ptr< V > NULL_OBJECT
NULL Object.
Definition: NearCache.h:73
virtual bool isInvalidatedOnChange() const
Definition: NearCache.h:147
virtual void put(const boost::shared_ptr< K > &key, const boost::shared_ptr< V > &value)
Puts (associates) a value with the given key.
Definition: NearCache.h:119
Definition: NearCacheStats.h:45