public class JiraVCacheServiceCreator extends Object
AbstractVCacheService
based on configuration properties. Currently
the following properties are supported:
Integer.MAX_VALUE
if not specified.CacheStatisticsMonitor.JIRA_CACHE_INSTRUMENTATION
- if defined vcache
statistics will be collected.Constructor and Description |
---|
JiraVCacheServiceCreator(JiraProperties jiraProperties,
Optional<com.atlassian.cache.CacheFactory> cacheFactory,
boolean avoidCasOps)
Constructs JiraVCacheServiceCreator.
|
Modifier and Type | Method and Description |
---|---|
io.atlassian.fugue.Pair<JiraVCacheRequestContextSupplier,com.atlassian.vcache.internal.core.service.AbstractVCacheService> |
createVCacheService()
Instantiates and configures appropriate implementation of
AbstractVCacheService and
JiraVCacheRequestContextSupplier based on JIRA environment and properties. |
public JiraVCacheServiceCreator(JiraProperties jiraProperties, Optional<com.atlassian.cache.CacheFactory> cacheFactory, boolean avoidCasOps)
jiraProperties
- that would be used to get properties that determine cache type that should be created.cacheFactory
- required if cache to be created is of type LegacyVCacheService
.avoidCasOps
- if set to true vcache would try to avoid calling CAS operations on underlying cache backend.
It is required for certain types of caches (e.g. ehcache) that do not support CAS.@Nonnull public io.atlassian.fugue.Pair<JiraVCacheRequestContextSupplier,com.atlassian.vcache.internal.core.service.AbstractVCacheService> createVCacheService()
AbstractVCacheService
and
JiraVCacheRequestContextSupplier
based on JIRA environment and properties.Copyright © 2002-2023 Atlassian. All Rights Reserved.