Package com.atlassian.confluence.cache
Class DefaultCacheSettingsManager
- java.lang.Object
-
- com.atlassian.confluence.cache.DefaultCacheSettingsManager
-
- All Implemented Interfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider
,CacheSettingsManager
,org.springframework.beans.factory.InitializingBean
public class DefaultCacheSettingsManager extends Object implements CacheSettingsManager, org.springframework.beans.factory.InitializingBean
An implementation ofCacheSettingsManager
which delegates to anotherCacheSettingsDefaultsProvider
to provide the default cache config, and anotherCacheSettingsManager
to handle the site-specific settings overrides.
-
-
Constructor Summary
Constructors Constructor Description DefaultCacheSettingsManager(com.atlassian.cache.CacheSettingsDefaultsProvider configDefaultsReader, CacheSettingsManager configOverridesManager)
DefaultCacheSettingsManager(BootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, String cacheSettingsDefaults, String cacheSettingsOverrides)
Deprecated.since 7.12 UseCacheSettingsManagerFactory
DefaultCacheSettingsManager(BootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, String cacheSettingsDefaults, String cacheSettingsOverrides, List<String> ignored)
Deprecated.since 5.9.1 UseCacheSettingsManagerFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
afterPropertiesSet()
Deprecated.since 7.12Optional<Integer>
changeMaxEntries(@NonNull String name, int newValue)
Change the max entries for a cache.@NonNull com.atlassian.cache.CacheSettings
getDefaults(@NonNull String cacheName)
void
reloadSettings()
boolean
saveSettings()
Persists all changes made so far by update* methods.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.atlassian.confluence.cache.CacheSettingsManager
updateMaxEntries
-
-
-
-
Constructor Detail
-
DefaultCacheSettingsManager
@Deprecated public DefaultCacheSettingsManager(BootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, String cacheSettingsDefaults, String cacheSettingsOverrides)
Deprecated.since 7.12 UseCacheSettingsManagerFactory
-
DefaultCacheSettingsManager
public DefaultCacheSettingsManager(com.atlassian.cache.CacheSettingsDefaultsProvider configDefaultsReader, CacheSettingsManager configOverridesManager)
-
DefaultCacheSettingsManager
@Deprecated public DefaultCacheSettingsManager(BootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, String cacheSettingsDefaults, String cacheSettingsOverrides, List<String> ignored)
Deprecated.since 5.9.1 UseCacheSettingsManagerFactory
-
-
Method Detail
-
afterPropertiesSet
@Deprecated public void afterPropertiesSet()
Deprecated.since 7.12- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
changeMaxEntries
public Optional<Integer> changeMaxEntries(@NonNull String name, int newValue)
Change the max entries for a cache. Returns the previous value if it was set, or null if it was not set.- Specified by:
changeMaxEntries
in interfaceCacheSettingsManager
- Parameters:
name
- the name of the cache to updatenewValue
-- Returns:
- the previous value of the specified max entries if any have
-
saveSettings
public boolean saveSettings()
Description copied from interface:CacheSettingsManager
Persists all changes made so far by update* methods.- Specified by:
saveSettings
in interfaceCacheSettingsManager
- Returns:
- true if changes were persisted successfully
-
reloadSettings
public void reloadSettings()
- Specified by:
reloadSettings
in interfaceCacheSettingsManager
-
getDefaults
public @NonNull com.atlassian.cache.CacheSettings getDefaults(@NonNull String cacheName)
- Specified by:
getDefaults
in interfacecom.atlassian.cache.CacheSettingsDefaultsProvider
-
-