public class HazelcastCacheManager extends AbstractCacheManager
CacheManager contract| Modifier and Type | Field and Description |
|---|---|
protected static String |
PREFIX |
protected static String |
PREFIX_CACHE |
protected static String |
PREFIX_CACHE_REFERENCE |
protected static String |
SETTINGS_MAP_NAME |
cacheCreationLocks, caches, cacheSettingsDefaultsProvider| Constructor and Description |
|---|
HazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast,
CacheFactory localCacheFactory,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkSettingsAreCompatible(String name,
CacheSettings settings) |
protected com.hazelcast.config.MapConfig |
configureMap(String mapName,
CacheSettings settings) |
protected <K,V> Cache<K,V> |
createAsyncHybridCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings) |
protected <V> CachedReference<V> |
createAsyncHybridCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings) |
protected <K,V> ManagedCache |
createComputingCache(String name,
CacheSettings settings,
CacheLoader<K,V> loader)
Creates a cache that upon a miss is able to populate itself using the loader.
|
protected <K,V> Cache<K,V> |
createDistributedCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings) |
protected <V> CachedReference<V> |
createDistributedCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings) |
protected <K,V> Cache<K,V> |
createHybridCache(String name,
CacheLoader<K,V> loader,
CacheSettings settings) |
protected <V> CachedReference<V> |
createHybridCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings) |
protected ManagedCache |
createSimpleCache(String name,
CacheSettings settings)
Creates a cache with no loader, i.e.
|
void |
destroy()
De-registers listeners.
|
<V> CachedReference<V> |
getCachedReference(String name,
Supplier<V> supplier,
CacheSettings settings)
Returns a Cached Reference, creating it if necessary.
|
com.hazelcast.core.HazelcastInstance |
getHazelcastInstance() |
void |
init()
Initializes the manager.
|
protected com.hazelcast.config.MapConfig |
reconfigureMap(String mapName,
CacheSettings newSettings) |
boolean |
updateCacheSettings(String mapName,
CacheSettings newSettings)
Update the cache settings of an existing cache.
|
flushCaches, getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings, shutdownprotected static final String PREFIX
protected static final String PREFIX_CACHE
protected static final String PREFIX_CACHE_REFERENCE
protected static final String SETTINGS_MAP_NAME
public HazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast,
CacheFactory localCacheFactory,
CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider)
public com.hazelcast.core.HazelcastInstance getHazelcastInstance()
@PostConstruct public void init()
protected <K,V> ManagedCache createComputingCache(@Nonnull String name, @Nonnull CacheSettings settings, CacheLoader<K,V> loader)
AbstractCacheManagercreateComputingCache in class AbstractCacheManagerprotected ManagedCache createSimpleCache(@Nonnull String name, @Nonnull CacheSettings settings)
AbstractCacheManagercreateSimpleCache in class AbstractCacheManagername - the name to give the cache (required)@PreDestroy public void destroy()
@Nonnull public <V> CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull Supplier<V> supplier, @Nonnull CacheSettings settings)
CacheFactoryname - the name of the Cached Referencesupplier - the supplier for value to be cached, called if the value needs to be generatedsettings - specifies the required cache settingsprotected void checkSettingsAreCompatible(String name, CacheSettings settings)
protected com.hazelcast.config.MapConfig configureMap(String mapName, CacheSettings settings)
protected com.hazelcast.config.MapConfig reconfigureMap(String mapName, CacheSettings newSettings)
public boolean updateCacheSettings(@Nonnull String mapName, @Nonnull CacheSettings newSettings)
ManagedCache methodsmapName - The name of the map to updatenewSettings - CacheSettings object representing the new settingsprotected <K,V> Cache<K,V> createAsyncHybridCache(String name, CacheLoader<K,V> loader, CacheSettings settings)
protected <V> CachedReference<V> createAsyncHybridCachedReference(String name, Supplier<V> supplier, CacheSettings settings)
protected <K,V> Cache<K,V> createDistributedCache(String name, CacheLoader<K,V> loader, CacheSettings settings)
protected <V> CachedReference<V> createDistributedCachedReference(String name, Supplier<V> supplier, CacheSettings settings)
protected <K,V> Cache<K,V> createHybridCache(String name, CacheLoader<K,V> loader, CacheSettings settings)
protected <V> CachedReference<V> createHybridCachedReference(String name, Supplier<V> supplier, CacheSettings settings)
Copyright © 2018 Atlassian. All rights reserved.