com.hazelcast.cache.impl.nearcache
Interface NearCacheManager

All Known Implementing Classes:
DefaultNearCacheManager

public interface NearCacheManager

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


Method Summary
 void clearAllNearCaches()
          Clears all defined NearCache instances.
 boolean clearNearCache(String name)
          Clears NearCache instance associated with given name but not removes it.
 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.
 

Method Detail

getNearCache

<K,V> NearCache<K,V> getNearCache(String name)
Gets the NearCache instance associated with given name.

Type Parameters:
K - the type of the key for Near Cache
V - the type of the value for Near Cache
Parameters:
name - the name of the NearCache instance will be got
Returns:
the NearCache instance associated with given name

getOrCreateNearCache

<K,V> NearCache<K,V> getOrCreateNearCache(String name,
                                          NearCacheConfig nearCacheConfig,
                                          NearCacheContext nearCacheContext)
Creates a new NearCache with given configurations or returns existing one.

Type Parameters:
K - the key type of the NearCache
V - the value type of the NearCache
Parameters:
name - the name of the NearCache to be created or existing one
nearCacheConfig - the NearCacheConfig of the NearCache to be created
nearCacheContext - the NearCacheContext of the NearCache to be created
Returns:
the created or existing NearCache instance associated with given name

listAllNearCaches

Collection<NearCache> listAllNearCaches()
Lists all existing NearCache instances.

Returns:
all existing NearCache instances

clearNearCache

boolean clearNearCache(String name)
Clears NearCache instance associated with given name but not removes it.

Parameters:
name - name of the NearCache to be cleared
Returns:
true if NearCache was found and cleared, otherwise false

clearAllNearCaches

void clearAllNearCaches()
Clears all defined NearCache instances.


destroyNearCache

boolean destroyNearCache(String name)
Destroys NearCache instance associated with given name and also removes it.

Parameters:
name - name of the NearCache to be destroyed
Returns:
true if NearCache was found and destroyed, otherwise false

destroyAllNearCaches

void destroyAllNearCaches()
Destroys all defined NearCache instances.



Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.