Hazelcast C++ Client
Public Member Functions | Protected Member Functions | List of all members
hazelcast::client::internal::nearcache::NearCacheManager Class Reference

NearCacheManager is the contract point to manage all existing NearCache instances. More...

#include <NearCacheManager.h>

Public Member Functions

 NearCacheManager (serialization::pimpl::SerializationService &ss)
 
template<typename K , typename V , typename KS >
boost::shared_ptr< NearCache< KS, V > > getNearCache (const std::string &name)
 Gets the NearCache instance associated with given. More...
 
template<typename K , typename V , typename KS >
boost::shared_ptr< NearCache< KS, V > > getOrCreateNearCache (const std::string &name, const config::NearCacheConfig< K, V > &nearCacheConfig, std::auto_ptr< adapter::DataStructureAdapter< K, V > > &dataStructureAdapter)
 Creates a new NearCache with given configurations or returns existing one. More...
 
bool clearNearCache (const std::string &name)
 Lists all existing NearCache instances. More...
 
void clearAllNearCaches ()
 Clears all defined NearCache instances.
 
bool destroyNearCache (const std::string &name)
 Destroys NearCache instance associated with given. More...
 
void destroyAllNearCaches ()
 Destroys all defined NearCache instances.
 

Protected Member Functions

template<typename K , typename V , typename KS >
std::auto_ptr< NearCache< KS, V > > createNearCache (const std::string &name, const config::NearCacheConfig< K, V > &nearCacheConfig)
 

Detailed Description

NearCacheManager is the contract point to manage all existing NearCache instances.

Member Function Documentation

bool hazelcast::client::internal::nearcache::NearCacheManager::clearNearCache ( const std::string &  name)
inline

Lists all existing NearCache instances.

Returns
all existing NearCache instances Clears NearCache instance associated with given
name
but not removes it.
Parameters
namename of the NearCache to be cleared
Returns
true
if NearCache was found and cleared,
false
otherwise
bool hazelcast::client::internal::nearcache::NearCacheManager::destroyNearCache ( const std::string &  name)
inline

Destroys NearCache instance associated with given.

name

and also removes it.

Parameters
namename of the NearCache to be destroyed
Returns
true
if NearCache was found and destroyed,
false
otherwise
template<typename K , typename V , typename KS >
boost::shared_ptr<NearCache<KS, V> > hazelcast::client::internal::nearcache::NearCacheManager::getNearCache ( const std::string &  name)
inline

Gets the NearCache instance associated with given.

name

.

Parameters
namethe name of the NearCache instance will be got
<K>the type of the key for Near Cache
<V>the type of the value for Near Cache
Returns
the NearCache instance associated with given
name
template<typename K , typename V , typename KS >
boost::shared_ptr<NearCache<KS, V> > hazelcast::client::internal::nearcache::NearCacheManager::getOrCreateNearCache ( const std::string &  name,
const config::NearCacheConfig< K, V > &  nearCacheConfig,
std::auto_ptr< adapter::DataStructureAdapter< K, V > > &  dataStructureAdapter 
)
inline

Creates a new NearCache with given configurations or returns existing one.

Triggers the pre-loading of the created NearCache via the supplied DataStructureAdapter.

Parameters
namethe name of the NearCache to be created or existing one
nearCacheConfigthe NearCacheConfig of the NearCache to be created
dataStructureAdapterthe DataStructureAdapter of the NearCache to be created
<K>the key type of the NearCache
<KS>the key type of the underlying cache store (this is usually Data)
<V>the value type of the NearCache
Returns
the created or existing NearCache instance associated with given
name

The documentation for this class was generated from the following file: