Package com.atlassian.jira.cache.slomo
Class SloMoCacheManager
java.lang.Object
com.atlassian.jira.cache.slomo.SloMoCacheManager
- All Implemented Interfaces:
com.atlassian.cache.CacheFactory
,com.atlassian.cache.CacheManager
@ParametersAreNonnullByDefault
public class SloMoCacheManager
extends Object
implements com.atlassian.cache.CacheManager
A rather obnoxious implementation of
CacheManager
that makes every remote cache slower.
This is intended for simulating what happens when caches live externally to the JVM and is only intended for development and testing purposes. As tempting as it might be, you must resist the urge to enable this on a production system. Your end users would be somewhat less than thrilled with that experience.
- Since:
- v7.1.0
-
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> cacheLoader, com.atlassian.cache.CacheSettings cacheSettings) <K,
V> com.atlassian.cache.Cache<K, V> Deprecated.<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<?,
?>> Deprecated.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
-
SloMoCacheManager
public SloMoCacheManager(com.atlassian.cache.CacheManager delegate, int delay)
-
-
Method Details
-
getCaches
Deprecated.- Specified by:
getCaches
in interfacecom.atlassian.cache.CacheManager
-
getManagedCaches
- Specified by:
getManagedCaches
in interfacecom.atlassian.cache.CacheManager
-
flushCaches
public void flushCaches()- Specified by:
flushCaches
in interfacecom.atlassian.cache.CacheManager
-
getManagedCache
- Specified by:
getManagedCache
in interfacecom.atlassian.cache.CacheManager
-
shutdown
public void shutdown()- Specified by:
shutdown
in interfacecom.atlassian.cache.CacheManager
-
getCachedReference
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(String name, com.atlassian.cache.Supplier<V> supplier) - Specified by:
getCachedReference
in interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings cacheSettings) - Specified by:
getCachedReference
in interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(Class<?> owningClass, String name, com.atlassian.cache.Supplier<V> supplier) - Specified by:
getCachedReference
in interfacecom.atlassian.cache.CacheFactory
-
getCachedReference
@Nonnull public <V> com.atlassian.cache.CachedReference<V> getCachedReference(Class<?> owningClass, String name, com.atlassian.cache.Supplier<V> supplier, com.atlassian.cache.CacheSettings cacheSettings) - Specified by:
getCachedReference
in interfacecom.atlassian.cache.CacheFactory
-
getCache
- Specified by:
getCache
in interfacecom.atlassian.cache.CacheFactory
-
getCache
- Specified by:
getCache
in interfacecom.atlassian.cache.CacheFactory
-
getCache
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(String name, @Nullable com.atlassian.cache.CacheLoader<K, V> cacheLoader) - Specified by:
getCache
in interfacecom.atlassian.cache.CacheFactory
-
getCache
@Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(String name, @Nullable com.atlassian.cache.CacheLoader<K, V> cacheLoader, com.atlassian.cache.CacheSettings cacheSettings) - Specified by:
getCache
in interfacecom.atlassian.cache.CacheFactory
-
getCache
@Deprecated @Nonnull public <K,V> com.atlassian.cache.Cache<K,V> getCache(String name, Class<K> keyClass, Class<V> valueClass) Deprecated.- Specified by:
getCache
in interfacecom.atlassian.cache.CacheFactory
-