public class DefaultNearCacheManager extends Object implements NearCacheManager
| Modifier and Type | Field and Description |
|---|---|
protected ClassLoader |
classLoader |
protected HazelcastProperties |
properties |
protected TaskScheduler |
scheduler |
protected SerializationService |
serializationService |
| Constructor and Description |
|---|
DefaultNearCacheManager(SerializationService ss,
TaskScheduler es,
ClassLoader classLoader,
HazelcastProperties properties) |
| 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) |
void |
destroyAllNearCaches()
Destroys all defined
NearCache instances. |
boolean |
destroyNearCache(String name)
Destroys
NearCache instance associated with given name and also removes it. |
protected ClassLoader |
getClassLoader() |
<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)
Creates a new
NearCache with given configurations
or returns existing one. |
<K,V> NearCache<K,V> |
getOrCreateNearCache(String name,
NearCacheConfig nearCacheConfig,
DataStructureAdapter dataStructureAdapter)
Creates a new
NearCache with given configurations or returns existing one. |
protected TaskScheduler |
getScheduler() |
protected SerializationService |
getSerializationService() |
Collection<NearCache> |
listAllNearCaches()
Lists all existing
NearCache instances. |
protected final TaskScheduler scheduler
protected final ClassLoader classLoader
protected final HazelcastProperties properties
protected final SerializationService serializationService
public DefaultNearCacheManager(SerializationService ss, TaskScheduler es, ClassLoader classLoader, HazelcastProperties properties)
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 TaskScheduler getScheduler()
protected ClassLoader getClassLoader()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.