public class DefaultNearCacheManager extends Object implements NearCacheManager
| Modifier and Type | Field and Description | 
|---|---|
| protected ClassLoader | classLoader | 
| protected ExecutionService | executionService | 
| protected SerializationService | serializationService | 
| Constructor and Description | 
|---|
| DefaultNearCacheManager(SerializationService ss,
                       ExecutionService es,
                       ClassLoader classLoader) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | clearAllNearCaches()Clears all defined  NearCacheinstances. | 
| boolean | clearNearCache(String name)Clears  NearCacheinstance associated with givennamebut not removes it. | 
| protected <K,V> NearCache<K,V> | createNearCache(String name,
               NearCacheConfig nearCacheConfig) | 
| void | destroyAllNearCaches()Destroys all defined  NearCacheinstances. | 
| boolean | destroyNearCache(String name)Destroys  NearCacheinstance associated with givennameand also removes it. | 
| protected ClassLoader | getClassLoader() | 
| protected ExecutionService | getExecutionService() | 
| <K,V> NearCache<K,V> | getNearCache(String name)Gets the  NearCacheinstance associated with givenname. | 
| <K,V> NearCache<K,V> | getOrCreateNearCache(String name,
                    NearCacheConfig nearCacheConfig)Creates a new  NearCachewith given configurations
 or returns existing one. | 
| <K,V> NearCache<K,V> | getOrCreateNearCache(String name,
                    NearCacheConfig nearCacheConfig,
                    DataStructureAdapter dataStructureAdapter)Creates a new  NearCachewith given configurations or returns existing one. | 
| protected SerializationService | getSerializationService() | 
| Collection<NearCache> | listAllNearCaches()Lists all existing  NearCacheinstances. | 
protected final SerializationService serializationService
protected final ExecutionService executionService
protected final ClassLoader classLoader
public DefaultNearCacheManager(SerializationService ss, ExecutionService es, ClassLoader classLoader)
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)
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 createdNearCache instance associated with given namepublic <K,V> NearCache<K,V> getOrCreateNearCache(String name, NearCacheConfig nearCacheConfig, DataStructureAdapter dataStructureAdapter)
NearCacheManagerNearCache with given configurations or returns existing one.
 Triggers the pre-loading of the created NearCache via the supplied DataStructureAdapter.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 createddataStructureAdapter - the DataStructureAdapter of the NearCache to be createdNearCache instance associated with given nameprotected <K,V> NearCache<K,V> createNearCache(String name, NearCacheConfig nearCacheConfig)
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, false otherwisepublic 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, false otherwisepublic void destroyAllNearCaches()
NearCacheManagerNearCache instances.destroyAllNearCaches in interface NearCacheManagerprotected SerializationService getSerializationService()
protected ExecutionService getExecutionService()
protected ClassLoader getClassLoader()
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.