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, util::ILogger &logger)
 
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 client::config::NearCacheConfig< K, V > &nearCacheConfig)
 Creates a new NearCache with given configurations or returns existing one. More...
 
bool clearNearCache (const std::string &name)
 Clears NearCache instance associated with given. 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.
 
std::vector< boost::shared_ptr< BaseNearCache > > listAllNearCaches ()
 Lists all existing NearCache instances. More...
 

Protected Member Functions

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

Detailed Description

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

Member Function Documentation

◆ clearNearCache()

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

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

◆ destroyNearCache()

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

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

◆ getNearCache()

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

◆ getOrCreateNearCache()

template<typename K , typename V , typename KS >
boost::shared_ptr<NearCache<KS, V> > hazelcast::client::internal::nearcache::NearCacheManager::getOrCreateNearCache ( const std::string &  name,
const client::config::NearCacheConfig< K, V > &  nearCacheConfig 
)
inline

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

Parameters
namethe name of the NearCache to be created or existing one
nearCacheConfigthe NearCacheConfig 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

◆ listAllNearCaches()

std::vector<boost::shared_ptr<BaseNearCache> > hazelcast::client::internal::nearcache::NearCacheManager::listAllNearCaches ( )

Lists all existing NearCache instances.

Returns
all existing NearCache instances

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