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)
NearCacheManager
NearCache
instance
associated with given name
.getNearCache
in interface NearCacheManager
K
- 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 name
public <K,V> NearCache<K,V> getOrCreateNearCache(String name, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
NearCacheManager
NearCache
with given configurations
or returns existing one.getOrCreateNearCache
in interface NearCacheManager
K
- the key type of the NearCache
V
- the value type of the NearCache
name
- 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 name
protected <K,V> NearCache<K,V> createNearCache(String name, NearCacheConfig nearCacheConfig, NearCacheContext nearCacheContext)
public Collection<NearCache> listAllNearCaches()
NearCacheManager
NearCache
instances.listAllNearCaches
in interface NearCacheManager
NearCache
instancespublic boolean clearNearCache(String name)
NearCacheManager
NearCache
instance associated with given name
but not removes it.clearNearCache
in interface NearCacheManager
name
- name of the NearCache
to be clearedtrue
if NearCache
was found and cleared, otherwise false
public void clearAllNearCaches()
NearCacheManager
NearCache
instances.clearAllNearCaches
in interface NearCacheManager
public boolean destroyNearCache(String name)
NearCacheManager
NearCache
instance associated with given name
and also removes it.destroyNearCache
in interface NearCacheManager
name
- name of the NearCache
to be destroyedtrue
if NearCache
was found and destroyed, otherwise false
public void destroyAllNearCaches()
NearCacheManager
NearCache
instances.destroyAllNearCaches
in interface NearCacheManager
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.