Class CacheFactoryEhcache
java.lang.Object
com.atlassian.crowd.manager.cache.CacheFactoryEhcache
- All Implemented Interfaces:
com.atlassian.cache.CacheFactory,com.atlassian.cache.CacheManager
public class CacheFactoryEhcache
extends Object
implements com.atlassian.cache.CacheFactory, com.atlassian.cache.CacheManager
A
CacheFactory (and also a CacheManager) backed by Ehcache. This is implemented
separately from atlassian-cache-ehcache to restrict the scope to how Crowd currently
uses Ehcache, and intentionally omit API that may not be supported by a future simpler version of
Cache.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid<K,V> com.atlassian.cache.Cache<K, V> <K,V> com.atlassian.cache.Cache<K, V> <K,V> com.atlassian.cache.Cache<K, V> <K,V> com.atlassian.cache.Cache<K, V> getCache(String name, com.atlassian.cache.CacheLoader<K, V> loader, com.atlassian.cache.CacheSettings required) <K,V> com.atlassian.cache.Cache<K, V> <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 required) <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 required) Collection<com.atlassian.cache.Cache<?,?>> com.atlassian.cache.ManagedCachegetManagedCache(String name) Collection<com.atlassian.cache.ManagedCache>voidshutdown()Methods 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
-
CacheFactoryEhcache
public CacheFactoryEhcache(net.sf.ehcache.CacheManager cacheManager)
-
-
Method Details
-
getCache
- Specified by:
getCachein interfacecom.atlassian.cache.CacheFactory
-
getCache
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(@Nonnull Class<?> owningClass, @Nonnull String name) - Specified by:
getCachein interfacecom.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:
getCachein interfacecom.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 required) - Specified by:
getCachein interfacecom.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:
getCachein interfacecom.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:
getCachedReferencein interfacecom.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 required) - Specified by:
getCachedReferencein interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(@Nonnull String name, @Nonnull com.atlassian.cache.Supplier<V> supplier) - Specified by:
getCachedReferencein interfacecom.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 required) - Specified by:
getCachedReferencein interfacecom.atlassian.cache.CacheFactory
-
flushCaches
public void flushCaches()- Specified by:
flushCachesin interfacecom.atlassian.cache.CacheManager
-
getCaches
- Specified by:
getCachesin interfacecom.atlassian.cache.CacheManager
-
getManagedCache
- Specified by:
getManagedCachein interfacecom.atlassian.cache.CacheManager
-
getManagedCaches
- Specified by:
getManagedCachesin interfacecom.atlassian.cache.CacheManager
-
shutdown
public void shutdown()- Specified by:
shutdownin interfacecom.atlassian.cache.CacheManager
-