com.atlassian.confluence.cache
Class CacheManagerSupport
java.lang.Object
com.atlassian.confluence.cache.CacheManagerSupport
- All Implemented Interfaces:
- com.atlassian.cache.CacheFactory, com.atlassian.cache.CacheManager
- Direct Known Subclasses:
- AbstractHazelcastCacheManager, SwitchingCacheManager
public abstract class CacheManagerSupport
- extends java.lang.Object
- implements com.atlassian.cache.CacheManager
A partial implementation of CacheManager
which provides default implementations for some
of the trivial methods. It also provides common code to handle interrogation of cache settings.
- Since:
- 5.6
Method Summary |
protected com.atlassian.cache.CacheSettings |
buildMergedCacheSettings(java.lang.String cacheName,
com.atlassian.cache.CacheSettings requiredSettings)
|
<K,V> com.atlassian.cache.Cache<K,V> |
|
getCache(java.lang.Class<?> owningClass,
java.lang.String name)
|
<K,V> com.atlassian.cache.Cache<K,V> |
|
getCache(java.lang.String name)
|
<K,V> com.atlassian.cache.Cache<K,V> |
|
getCache(java.lang.String name,
com.atlassian.cache.CacheLoader<K,V> loader)
|
abstract
<K,V> com.atlassian.cache.Cache<K,V> |
|
getCache(java.lang.String name,
com.atlassian.cache.CacheLoader<K,V> loader,
com.atlassian.cache.CacheSettings required)
|
<K,V> com.atlassian.cache.Cache<K,V> |
|
getCache(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
|
<V> com.atlassian.cache.CachedReference<V> |
|
getCachedReference(java.lang.Class<?> owningClass,
java.lang.String name,
com.atlassian.cache.Supplier<V> supplier)
|
<V> com.atlassian.cache.CachedReference<V> |
|
getCachedReference(java.lang.Class<?> owningClass,
java.lang.String name,
com.atlassian.cache.Supplier<V> supplier,
com.atlassian.cache.CacheSettings required)
|
<V> com.atlassian.cache.CachedReference<V> |
|
getCachedReference(java.lang.String name,
com.atlassian.cache.Supplier<V> supplier)
|
abstract
<V> com.atlassian.cache.CachedReference<V> |
|
getCachedReference(java.lang.String name,
com.atlassian.cache.Supplier<V> supplier,
com.atlassian.cache.CacheSettings required)
|
protected static boolean |
isLocalCache(com.atlassian.cache.CacheSettings cacheSettings)
|
protected static boolean |
isReplicatedCache(com.atlassian.cache.CacheSettings cacheSettings)
|
protected static java.lang.String |
toName(java.lang.Class<?> owningClass,
java.lang.String fieldName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.cache.CacheManager |
flushCaches, getCaches, getManagedCache, getManagedCaches |
CacheManagerSupport
public CacheManagerSupport(CacheSettingsManager cacheSettingsManager)
buildMergedCacheSettings
protected com.atlassian.cache.CacheSettings buildMergedCacheSettings(java.lang.String cacheName,
com.atlassian.cache.CacheSettings requiredSettings)
isLocalCache
protected static boolean isLocalCache(com.atlassian.cache.CacheSettings cacheSettings)
isReplicatedCache
protected static boolean isReplicatedCache(com.atlassian.cache.CacheSettings cacheSettings)
getCache
public <K,V> com.atlassian.cache.Cache<K,V> getCache(java.lang.String name)
- Specified by:
getCache
in interface com.atlassian.cache.CacheFactory
getCache
public <K,V> com.atlassian.cache.Cache<K,V> getCache(java.lang.String name,
java.lang.Class<K> keyType,
java.lang.Class<V> valueType)
- Specified by:
getCache
in interface com.atlassian.cache.CacheFactory
getCache
public <K,V> com.atlassian.cache.Cache<K,V> getCache(java.lang.Class<?> owningClass,
java.lang.String name)
- Specified by:
getCache
in interface com.atlassian.cache.CacheFactory
getCache
public <K,V> com.atlassian.cache.Cache<K,V> getCache(java.lang.String name,
com.atlassian.cache.CacheLoader<K,V> loader)
- Specified by:
getCache
in interface com.atlassian.cache.CacheFactory
getCache
public abstract <K,V> com.atlassian.cache.Cache<K,V> getCache(java.lang.String name,
com.atlassian.cache.CacheLoader<K,V> loader,
com.atlassian.cache.CacheSettings required)
- Specified by:
getCache
in interface com.atlassian.cache.CacheFactory
getCachedReference
public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.String name,
com.atlassian.cache.Supplier<V> supplier)
- Specified by:
getCachedReference
in interface com.atlassian.cache.CacheFactory
getCachedReference
public abstract <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.String name,
com.atlassian.cache.Supplier<V> supplier,
com.atlassian.cache.CacheSettings required)
- Specified by:
getCachedReference
in interface com.atlassian.cache.CacheFactory
getCachedReference
public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.Class<?> owningClass,
java.lang.String name,
com.atlassian.cache.Supplier<V> supplier)
- Specified by:
getCachedReference
in interface com.atlassian.cache.CacheFactory
getCachedReference
public <V> com.atlassian.cache.CachedReference<V> getCachedReference(java.lang.Class<?> owningClass,
java.lang.String name,
com.atlassian.cache.Supplier<V> supplier,
com.atlassian.cache.CacheSettings required)
- Specified by:
getCachedReference
in interface com.atlassian.cache.CacheFactory
toName
protected static java.lang.String toName(java.lang.Class<?> owningClass,
java.lang.String fieldName)
Copyright © 2003-2014 Atlassian. All Rights Reserved.