public class SwitchingCacheFactoryImpl extends Object implements SwitchingCacheFactory
JIRA_VERTIGO_GLOBAL_VCACHE_ENABLE
Constructor and Description |
---|
SwitchingCacheFactoryImpl(InstanceFeatureManager instanceFeatureManager,
com.atlassian.vcache.VCacheFactory vCacheFactory,
com.atlassian.cache.CacheManager cacheManager) |
Modifier and Type | Method and Description |
---|---|
<K,V> CacheAdapter<K,V> |
buildSwitchingRequestCache(String cacheName,
Optional<com.atlassian.cache.CacheSettings> cacheSettings,
String darkFeatureKey)
Creates a wrapper over either
Cache or RequestCache depending
on whether the dark feature key for either this cache or the big bang key is enabled. |
<V> SingleValueLocalCache<V> |
buildSwitchingRequestCache(String cacheName,
java.util.function.Supplier<V> supplier,
String darkFeatureKey)
Creates a single value cache wrapper over either
Cache or RequestCache depending
on whether the dark feature key for either this cache or the big bang key is enabled. |
public SwitchingCacheFactoryImpl(InstanceFeatureManager instanceFeatureManager, com.atlassian.vcache.VCacheFactory vCacheFactory, com.atlassian.cache.CacheManager cacheManager)
public <K,V> CacheAdapter<K,V> buildSwitchingRequestCache(String cacheName, Optional<com.atlassian.cache.CacheSettings> cacheSettings, String darkFeatureKey)
SwitchingCacheFactory
Cache
or RequestCache
depending
on whether the dark feature key for either this cache or the big bang key is enabled.buildSwitchingRequestCache
in interface SwitchingCacheFactory
K
- The key type.V
- The value type.cacheName
- The name of the cache (must have no whitespace).cacheSettings
- Optional cache settings, valid for atlassian cache caches ONLY.darkFeatureKey
- The dark feature key associated with making only this cache a request cache.Cache
or
RequestCache
depending on whether the dark feature
key for either this cache or the big bang key is enabled.public <V> SingleValueLocalCache<V> buildSwitchingRequestCache(String cacheName, java.util.function.Supplier<V> supplier, String darkFeatureKey)
SwitchingCacheFactory
Cache
or RequestCache
depending
on whether the dark feature key for either this cache or the big bang key is enabled.buildSwitchingRequestCache
in interface SwitchingCacheFactory
V
- The value type.cacheName
- The name of the cache (must have no whitespace).darkFeatureKey
- The dark feature key associated with making only this cache a request cache.Cache
or
RequestCache
depending on whether the dark feature
key for either this cache or the big bang key is enabled.Copyright © 2002-2017 Atlassian. All Rights Reserved.