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
-
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.ManagedCache
getManagedCache
(String name) Collection<com.atlassian.cache.ManagedCache>
void
shutdown()
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.CacheFactory
getReadThroughCache, getReadThroughCache
-
Constructor Details
-
CacheFactoryEhcache
public CacheFactoryEhcache(net.sf.ehcache.CacheManager cacheManager)
-
-
Method Details
-
getCache
- Specified by:
getCache
in interfacecom.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 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:
getCache
in 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:
getCache
in 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:
getCache
in 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:
getCachedReference
in 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:
getCachedReference
in 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:
getCachedReference
in 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:
getCachedReference
in interfacecom.atlassian.cache.CacheFactory
-
flushCaches
public void flushCaches()- Specified by:
flushCaches
in interfacecom.atlassian.cache.CacheManager
-
getCaches
- Specified by:
getCaches
in interfacecom.atlassian.cache.CacheManager
-
getManagedCache
- Specified by:
getManagedCache
in interfacecom.atlassian.cache.CacheManager
-
getManagedCaches
- Specified by:
getManagedCaches
in interfacecom.atlassian.cache.CacheManager
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfacecom.atlassian.cache.CacheManager
-