Class EhCacheManager
java.lang.Object
com.atlassian.confluence.cache.ehcache.EhCacheManager
- All Implemented Interfaces:
com.atlassian.cache.CacheFactory,com.atlassian.cache.CacheManager
Confluence-specific implementation of
CacheManager which delegates to an atlassian-cache
EhCacheManager, decorating it with Confluence-specific functionality.-
Constructor Summary
ConstructorsConstructorDescriptionEhCacheManager(com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoid<K,V> @NonNull com.atlassian.cache.Cache <K, V> <K,V> @NonNull com.atlassian.confluence.cache.ehcache.ConfluenceEhCache <K, V> <K,V> @NonNull com.atlassian.cache.Cache <K, V> <K,V> @NonNull com.atlassian.confluence.cache.ehcache.ConfluenceEhCache <K, V> getCache(@NonNull String name, com.atlassian.cache.CacheLoader<K, V> loader, @NonNull com.atlassian.cache.CacheSettings settings) <K,V> @NonNull com.atlassian.cache.Cache <K, V> Deprecated.since 5.7, since it's deprecated in atlassian-cache library 2.5.0<V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull Class<?> owningClass, @NonNull String fieldName, @NonNull com.atlassian.cache.Supplier<V> supplier) <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull Class<?> owningClass, @NonNull String fieldName, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings settings) <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier) <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings settings) @NonNull Collection<com.atlassian.cache.Cache<?, ?>> Deprecated.since 7.2.net.sf.ehcache.CacheManagercom.atlassian.cache.ManagedCachegetManagedCache(@NonNull String name) @NonNull Collection<com.atlassian.cache.ManagedCache> voidshutdown()voidMethods 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
-
Constructor Details
-
EhCacheManager
public EhCacheManager(com.atlassian.cache.CacheSettingsDefaultsProvider cacheSettingsDefaultsProvider) - Since:
- 8.3
-
-
Method Details
-
shutdownCacheManager
@PreDestroy public void shutdownCacheManager() -
flushCaches
public void flushCaches()- Specified by:
flushCachesin interfacecom.atlassian.cache.CacheManager
-
getCaches
Deprecated.since 7.2. UsegetManagedCaches()instead.- Specified by:
getCachesin interfacecom.atlassian.cache.CacheManager
-
getCache
public <K,V> @NonNull com.atlassian.confluence.cache.ehcache.ConfluenceEhCache<K,V> getCache(@NonNull String name) - Specified by:
getCachein interfacecom.atlassian.cache.CacheFactory
-
getCache
@Deprecated public <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull String name, @NonNull Class<K> keyType, @NonNull Class<V> valueType) Deprecated.since 5.7, since it's deprecated in atlassian-cache library 2.5.0- Specified by:
getCachein interfacecom.atlassian.cache.CacheFactory
-
getManagedCaches
- Specified by:
getManagedCachesin interfacecom.atlassian.cache.CacheManager
-
getManagedCache
- Specified by:
getManagedCachein interfacecom.atlassian.cache.CacheManager
-
shutdown
public void shutdown()- Specified by:
shutdownin interfacecom.atlassian.cache.CacheManager
-
getCachedReference
public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier) - Specified by:
getCachedReferencein interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull String name, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings settings) - Specified by:
getCachedReferencein interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull Class<?> owningClass, @NonNull String fieldName, @NonNull com.atlassian.cache.Supplier<V> supplier) - Specified by:
getCachedReferencein interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
public <V> @NonNull com.atlassian.cache.CachedReference<V> getCachedReference(@NonNull Class<?> owningClass, @NonNull String fieldName, @NonNull com.atlassian.cache.Supplier<V> supplier, @NonNull com.atlassian.cache.CacheSettings settings) - Specified by:
getCachedReferencein interfacecom.atlassian.cache.CacheFactory
-
getCache
public <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull Class<?> owningClass, @NonNull String name) - Specified by:
getCachein interfacecom.atlassian.cache.CacheFactory
-
getCache
public <K,V> @NonNull com.atlassian.cache.Cache<K,V> getCache(@NonNull String name, com.atlassian.cache.CacheLoader<K, V> loader) - Specified by:
getCachein interfacecom.atlassian.cache.CacheFactory
-
getCache
public <K,V> @NonNull com.atlassian.confluence.cache.ehcache.ConfluenceEhCache<K,V> getCache(@NonNull String name, com.atlassian.cache.CacheLoader<K, V> loader, @NonNull com.atlassian.cache.CacheSettings settings) - Specified by:
getCachein interfacecom.atlassian.cache.CacheFactory
-
getEhCacheManager
public net.sf.ehcache.CacheManager getEhCacheManager()
-