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>
55 :
public spi::InitializingObject,
public util::Clearable,
public util::Destroyable {
69 virtual const std::string &getName()
const = 0;
81 template<
typename K,
typename V>
112 virtual boost::shared_ptr<V>
get(
const boost::shared_ptr<K> &key) {
114 return boost::shared_ptr<V>();
123 virtual void put(
const boost::shared_ptr<K> &key,
const boost::shared_ptr<V> &value) {
133 virtual void put(
const boost::shared_ptr<K> &key,
134 const boost::shared_ptr<serialization::pimpl::Data> &value) {
164 return client::config::BINARY;
178 template<
typename K,
typename V>
185 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64) virtual int size() const
Gets the count of stored records.
Definition: NearCache.h:172
static const int DEFAULT_EXPIRATION_TASK_DELAY_IN_SECONDS
Default expiration task delay time as seconds.
Definition: NearCache.h:104
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:133
virtual bool invalidate(const boost::shared_ptr< K > &key)
Removes the value associated with the given.
Definition: NearCache.h:144
Definition: NearCache.h:54
Definition: NearCache.h:50
NearCache is the contract point to store keys and values in underlying com.hazelcast.cache.impl.nearcache.NearCacheRecordStore.
Definition: NearCache.h:82
static const int DEFAULT_EXPIRATION_TASK_INITIAL_DELAY_IN_SECONDS
Default expiration task initial delay time as seconds.
Definition: NearCache.h:99
static boost::shared_ptr< V > NULL_OBJECT
NULL Object.
Definition: NearCache.h:87
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:123
virtual bool isInvalidatedOnChange() const
Definition: NearCache.h:152
virtual const client::config::InMemoryFormat getInMemoryFormat() const
Gets the com.hazelcast.config.InMemoryFormat of the storage for internal records. ...
Definition: NearCache.h:162
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32
Definition: NearCacheStats.h:45