Package com.atlassian.cache.hazelcast
Class HazelcastCacheManager
java.lang.Object
com.atlassian.cache.impl.AbstractCacheManager
com.atlassian.cache.hazelcast.HazelcastCacheManager
- All Implemented Interfaces:
com.atlassian.cache.CacheFactory,com.atlassian.cache.CacheManager
@Internal
public class HazelcastCacheManager
extends com.atlassian.cache.impl.AbstractCacheManager
Hazelcast implementation of the
CacheManager contract-
Field Summary
FieldsFields inherited from class com.atlassian.cache.impl.AbstractCacheManager
cacheCreationLocks, caches, cacheSettingsDefaultsProvider -
Constructor Summary
ConstructorsConstructorDescriptionHazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast, com.atlassian.cache.CacheFactory localCacheFactory, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) HazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast, com.atlassian.cache.CacheFactory localCacheFactory, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider, HazelcastNameFactory nameFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckSettingsAreCompatible(String name, com.atlassian.cache.CacheSettings settings) protected <K,V> com.atlassian.cache.Cache<K, V> createAsyncHybridCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings settings) protected <V> com.atlassian.cache.CachedReference<V>createAsyncHybridCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings) protected <K,V> com.atlassian.cache.ManagedCache createComputingCache(String name, com.atlassian.cache.CacheSettings settings, com.atlassian.cache.CacheLoader<K, V> loader) protected <K,V> com.atlassian.cache.Cache<K, V> createDistributedCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings settings) protected <V> com.atlassian.cache.CachedReference<V>createDistributedCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings) protected <K,V> com.atlassian.cache.Cache<K, V> createHybridCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings settings) protected <V> com.atlassian.cache.CachedReference<V>createHybridCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings) protected com.atlassian.cache.ManagedCachecreateSimpleCache(String name, com.atlassian.cache.CacheSettings settings) voiddestroy()De-registers listeners.<V> com.atlassian.cache.CachedReference<V>getCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings) com.hazelcast.core.HazelcastInstancevoidinit()Initializes the manager.booleanupdateCacheSettings(String mapName, com.atlassian.cache.CacheSettings newSettings) Update the cache settings of an existing cache.Methods inherited from class com.atlassian.cache.impl.AbstractCacheManager
flushCaches, getCache, getCache, getCache, getCache, getCache, getCachedReference, getCachedReference, getCachedReference, getCaches, getManagedCache, getManagedCaches, mergeSettings, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.cache.CacheFactory
getReadThroughCache, getReadThroughCache
-
Field Details
-
SETTINGS_MAP_NAME
- See Also:
-
-
Constructor Details
-
HazelcastCacheManager
public HazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast, com.atlassian.cache.CacheFactory localCacheFactory, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) -
HazelcastCacheManager
public HazelcastCacheManager(com.hazelcast.core.HazelcastInstance hazelcast, com.atlassian.cache.CacheFactory localCacheFactory, com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider, HazelcastNameFactory nameFactory)
-
-
Method Details
-
getHazelcastInstance
public com.hazelcast.core.HazelcastInstance getHazelcastInstance() -
init
Initializes the manager. This method must be called after the bean has been created. -
createComputingCache
protected <K,V> com.atlassian.cache.ManagedCache createComputingCache(@Nonnull String name, @Nonnull com.atlassian.cache.CacheSettings settings, com.atlassian.cache.CacheLoader<K, V> loader) - Specified by:
createComputingCachein classcom.atlassian.cache.impl.AbstractCacheManager
-
createSimpleCache
protected com.atlassian.cache.ManagedCache createSimpleCache(@Nonnull String name, @Nonnull com.atlassian.cache.CacheSettings settings) - Specified by:
createSimpleCachein classcom.atlassian.cache.impl.AbstractCacheManager
-
destroy
De-registers listeners. This method must be called when the bean is no longer required. -
getCachedReference
-
checkSettingsAreCompatible
-
updateCacheSettings
public boolean updateCacheSettings(@Nonnull String mapName, @Nonnull com.atlassian.cache.CacheSettings newSettings) Update the cache settings of an existing cache. Called byManagedCachemethods- Parameters:
mapName- The name of the map to updatenewSettings- CacheSettings object representing the new settings- Returns:
- true if the update succeeded, false otherwise
-
createAsyncHybridCache
protected <K,V> com.atlassian.cache.Cache<K,V> createAsyncHybridCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings settings) -
createAsyncHybridCachedReference
protected <V> com.atlassian.cache.CachedReference<V> createAsyncHybridCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings) -
createDistributedCache
protected <K,V> com.atlassian.cache.Cache<K,V> createDistributedCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings settings) -
createDistributedCachedReference
protected <V> com.atlassian.cache.CachedReference<V> createDistributedCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings) -
createHybridCache
protected <K,V> com.atlassian.cache.Cache<K,V> createHybridCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings settings) -
createHybridCachedReference
protected <V> com.atlassian.cache.CachedReference<V> createHybridCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings settings)
-