public class DefaultNearCacheManager extends Object implements NearCacheManager
| Constructor and Description |
|---|
DefaultNearCacheManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllNearCaches()
Clears all defined
NearCache instances. |
boolean |
clearNearCache(String name)
Clears
NearCache instance associated with given name
but not removes it. |
protected <K,V> NearCache<K,V> |
createNearCache(String name,
NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext) |
void |
destroyAllNearCaches()
Destroys all defined
NearCache instances. |
boolean |
destroyNearCache(String name)
Destroys
NearCache instance associated with given name
and also removes it. |
<K,V> NearCache<K,V> |
getNearCache(String name)
Gets the
NearCache instance
associated with given name. |
<K,V> NearCache<K,V> |
getOrCreateNearCache(String name,
NearCacheConfig nearCacheConfig,
NearCacheContext nearCacheContext)
Creates a new
NearCache with given configurations
or returns existing one. |
Collection<NearCache> |
listAllNearCaches()
Lists all existing
NearCache instances. |
public <K,V> NearCache<K,V> getNearCache(String name)
NearCacheManagerNearCache instance
associated with given name.getNearCache in interface NearCacheManagerK - the type of the key for Near CacheV - the type of the value for Near Cachename - the name of the NearCache instance will be gotNearCache instance
associated with given namepublic <K,V> NearCache<K,V> getOrCreateNearCache(String name, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
NearCacheManagerNearCache with given configurations
or returns existing one.getOrCreateNearCache in interface NearCacheManagerK - the key type of the NearCacheV - the value type of the NearCachename - the name of the NearCache
to be created or existing onenearCacheConfig - the NearCacheConfig of the
NearCache to be creatednearCacheContext - the NearCacheContext of the
NearCache to be createdNearCache instance
associated with given nameprotected <K,V> NearCache<K,V> createNearCache(String name, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
public Collection<NearCache> listAllNearCaches()
NearCacheManagerNearCache instances.listAllNearCaches in interface NearCacheManagerNearCache instancespublic boolean clearNearCache(String name)
NearCacheManagerNearCache instance associated with given name
but not removes it.clearNearCache in interface NearCacheManagername - name of the NearCache to be clearedtrue if NearCache
was found and cleared, otherwise falsepublic void clearAllNearCaches()
NearCacheManagerNearCache instances.clearAllNearCaches in interface NearCacheManagerpublic boolean destroyNearCache(String name)
NearCacheManagerNearCache instance associated with given name
and also removes it.destroyNearCache in interface NearCacheManagername - name of the NearCache to be destroyedtrue if NearCache
was found and destroyed, otherwise falsepublic void destroyAllNearCaches()
NearCacheManagerNearCache instances.destroyAllNearCaches in interface NearCacheManagerCopyright © 2015 Hazelcast, Inc.. All Rights Reserved.