com.atlassian.confluence.cache.hazelcast
Class ConfluenceHazelcastCacheManager
java.lang.Object
com.atlassian.confluence.cache.hazelcast.ConfluenceHazelcastCacheManager
- All Implemented Interfaces:
- com.atlassian.cache.CacheFactory, com.atlassian.cache.CacheManager, LockingCacheManager
@Internal
public class ConfluenceHazelcastCacheManager
- extends Object
- implements LockingCacheManager
Confluence wrapper around the atlassian-cache implementation of HazelcastCacheManager
It will wrap all caches in Monitoring Caches, and all Loaders in ConfluenceMonitoringLoaders.
- Since:
- 5.7
|
Method Summary |
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. |
|
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()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConfluenceHazelcastCacheManager
public ConfluenceHazelcastCacheManager(HazelcastClusterManager hazelcastClusterManager,
com.atlassian.cache.CacheManager localCacheManager,
ConfluenceMonitoring confluenceMonitoring,
CacheSettingsManager cacheSettingsManager,
HazelcastHelper hazelcastHelper)
getLockingCache
@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)
- Description copied from interface:
LockingCacheManager
- This method allows a client to get a cache that support explicit locking methods. We try to discourage this, and
that's why this method is in it's own interface.
This method will also wrap the lockingCache in a confluence monitoring wrapper.
- Specified by:
getLockingCache in interface LockingCacheManager
- Type Parameters:
K - The key type of the cacheV - The value type of the cache- Parameters:
name - The name of the cache you are requestingloader - A cacheLoader to populate cache entriescacheSettings - A cacheSettings object describing the attributes of the cache
- Returns:
- An atlassian-cache cache with locking semantics
getCaches
@Nonnull
@Deprecated
public Collection<com.atlassian.cache.Cache<?,?>> getCaches()
- Deprecated.
- Specified by:
getCaches in interface com.atlassian.cache.CacheManager
getManagedCaches
@Nonnull
public Collection<com.atlassian.cache.ManagedCache> getManagedCaches()
- Specified by:
getManagedCaches in interface com.atlassian.cache.CacheManager
flushCaches
public void flushCaches()
- Specified by:
flushCaches in interface com.atlassian.cache.CacheManager
getManagedCache
@Nullable
public com.atlassian.cache.ManagedCache getManagedCache(@Nonnull
String name)
- Specified by:
getManagedCache in interface com.atlassian.cache.CacheManager
shutdown
public void shutdown()
- Specified by:
shutdown in interface com.atlassian.cache.CacheManager
getCachedReference
@Nonnull
public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull
String name,
@Nonnull
com.atlassian.cache.Supplier<V> supplier)
- Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory
getCachedReference
@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)
- Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory
getCachedReference
@Nonnull
public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull
Class<?> owningClass,
@Nonnull
String name,
@Nonnull
com.atlassian.cache.Supplier<V> supplier)
- Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory
getCachedReference
@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)
- Specified by:
getCachedReference in interface com.atlassian.cache.CacheFactory
getCache
@Nonnull
public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull
String name)
- Specified by:
getCache in interface com.atlassian.cache.CacheFactory
getCache
@Nonnull
public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull
Class<?> owningClass,
@Nonnull
String name)
- Specified by:
getCache in interface com.atlassian.cache.CacheFactory
getCache
@Nonnull
public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull
String name,
@Nullable
com.atlassian.cache.CacheLoader<K,V> loader)
- Specified by:
getCache in interface com.atlassian.cache.CacheFactory
getCache
@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)
- Specified by:
getCache in interface com.atlassian.cache.CacheFactory
getCache
@Nonnull
public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull
String name,
@Nonnull
Class<K> keyType,
@Nonnull
Class<V> valueType)
- Specified by:
getCache in interface com.atlassian.cache.CacheFactory
Copyright © 2003–2015 Atlassian. All rights reserved.