@Internal public class ConfluenceHazelcastCacheManager extends Object implements LockingCacheManager
It will wrap all caches in Monitoring Caches, and all Loaders in ConfluenceMonitoringLoaders.
Constructor and Description |
---|
ConfluenceHazelcastCacheManager(HazelcastClusterManager hazelcastClusterManager,
com.atlassian.cache.CacheManager localCacheManager,
ConfluenceMonitoring confluenceMonitoring,
CacheSettingsManager cacheSettingsManager,
HazelcastHelper hazelcastHelper) |
Modifier and Type | Method and Description |
---|---|
void |
flushCaches() |
<K,V> com.atlassian.cache.Cache<K,V> |
getCache(Class<?> owningClass,
String name) |
<K,V> com.atlassian.cache.Cache<K,V> |
getCache(String name) |
<K,V> com.atlassian.cache.Cache<K,V> |
getCache(String name,
com.atlassian.cache.CacheLoader<K,V> loader) |
<K,V> com.atlassian.cache.Cache<K,V> |
getCache(String name,
com.atlassian.cache.CacheLoader<K,V> loader,
com.atlassian.cache.CacheSettings cacheSettings) |
<K,V> com.atlassian.cache.Cache<K,V> |
getCache(String name,
Class<K> keyType,
Class<V> valueType) |
<V> com.atlassian.cache.CachedReference<V> |
getCachedReference(Class<?> owningClass,
String name,
com.atlassian.cache.Supplier<V> supplier) |
<V> com.atlassian.cache.CachedReference<V> |
getCachedReference(Class<?> owningClass,
String name,
com.atlassian.cache.Supplier<V> supplier,
com.atlassian.cache.CacheSettings cacheSettings) |
<V> com.atlassian.cache.CachedReference<V> |
getCachedReference(String name,
com.atlassian.cache.Supplier<V> supplier) |
<V> com.atlassian.cache.CachedReference<V> |
getCachedReference(String name,
com.atlassian.cache.Supplier<V> supplier,
com.atlassian.cache.CacheSettings cacheSettings) |
Collection<com.atlassian.cache.Cache<?,?>> |
getCaches()
Deprecated.
|
<K,V> LockingCache<K,V> |
getLockingCache(String name,
com.atlassian.cache.CacheLoader<K,V> loader,
com.atlassian.cache.CacheSettings cacheSettings)
This method allows a client to get a cache that support explicit locking methods.
|
com.atlassian.cache.ManagedCache |
getManagedCache(String name) |
Collection<com.atlassian.cache.ManagedCache> |
getManagedCaches() |
void |
shutdown() |
public ConfluenceHazelcastCacheManager(HazelcastClusterManager hazelcastClusterManager, com.atlassian.cache.CacheManager localCacheManager, ConfluenceMonitoring confluenceMonitoring, CacheSettingsManager cacheSettingsManager, HazelcastHelper hazelcastHelper)
@Nonnull public <K,V> LockingCache<K,V> getLockingCache(@Nonnull String name, @Nullable com.atlassian.cache.CacheLoader<K,V> loader, @Nonnull com.atlassian.cache.CacheSettings cacheSettings)
LockingCacheManager
This method will also wrap the lockingCache in a confluence monitoring wrapper.
getLockingCache
in interface LockingCacheManager
K
- The key type of the cacheV
- The value type of the cachename
- The name of the cache you are requestingloader
- A cacheLoader to populate cache entriescacheSettings
- A cacheSettings object describing the attributes of the cache@Nonnull @Deprecated public Collection<com.atlassian.cache.Cache<?,?>> getCaches()
getCaches
in interface com.atlassian.cache.CacheManager
@Nonnull public Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
getManagedCaches
in interface com.atlassian.cache.CacheManager
public void flushCaches()
flushCaches
in interface com.atlassian.cache.CacheManager
@Nullable public com.atlassian.cache.ManagedCache getManagedCache(@Nonnull String name)
getManagedCache
in interface com.atlassian.cache.CacheManager
public void shutdown()
shutdown
in interface com.atlassian.cache.CacheManager
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull com.atlassian.cache.Supplier<V> supplier)
getCachedReference
in interface com.atlassian.cache.CacheFactory
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull com.atlassian.cache.Supplier<V> supplier, @Nonnull com.atlassian.cache.CacheSettings cacheSettings)
getCachedReference
in interface com.atlassian.cache.CacheFactory
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull Class<?> owningClass, @Nonnull String name, @Nonnull com.atlassian.cache.Supplier<V> supplier)
getCachedReference
in interface com.atlassian.cache.CacheFactory
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull Class<?> owningClass, @Nonnull String name, @Nonnull com.atlassian.cache.Supplier<V> supplier, @Nonnull com.atlassian.cache.CacheSettings cacheSettings)
getCachedReference
in interface com.atlassian.cache.CacheFactory
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull String name)
getCache
in interface com.atlassian.cache.CacheFactory
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull Class<?> owningClass, @Nonnull String name)
getCache
in interface com.atlassian.cache.CacheFactory
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull String name, @Nullable com.atlassian.cache.CacheLoader<K,V> loader)
getCache
in interface com.atlassian.cache.CacheFactory
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull String name, @Nullable com.atlassian.cache.CacheLoader<K,V> loader, @Nonnull com.atlassian.cache.CacheSettings cacheSettings)
getCache
in interface com.atlassian.cache.CacheFactory
Copyright © 2003–2017 Atlassian. All rights reserved.