@Deprecated public class DefaultCacheSettingsManager extends Object implements CacheSettingsManager, org.springframework.beans.factory.InitializingBean
CacheSettingsManager
that uses a read-only Configuration
file that specifies the cache defaults. The configuration file must be in the format to be parsed using the Typesafe Config Library.
The format of the file must include an entry caches which is an array of objects, that each object contains the following cacheSettingsOverridesProperties:
A config object may contain the following cacheSettingsOverridesProperties:
CacheSettingsBuilder.expireAfterAccess
hint
CacheSettingsBuilder.expireAfterWrite
hint
CacheSettingsBuilder.flushable()
hint CacheSettingsBuilder.local()
hint CacheSettingsBuilder.maxEntries
hint
CacheSettingsBuilder.replicateAsynchronously()
hint
CacheSettingsBuilder.replicateViaCopy()
hint An example minimal configuration file is:
// Defaults for local caches local-defaults = { local = true flushable = true max-entries = 1000 expire-after-access-secs = 360 } // Defaults for replicated caches remote-defaults = ${local-defaults} { local = false replicate-via-copy = true } remote-big = ${remote-defaults} { expire-after-write-secs = 42 flushable = false replicate-async = true replicate-via-copy = false max-entries = 666666 } caches = [ { name = "a.local.cache", config = ${local-defaults} } { name = "a.remote.cache", config = ${remote-defaults} } { name = "big.ones.*", config = ${remote-big} } { name = "reg.+exp[chars(\\", config = ${remote-big} } { name = "*", config = ${remote-defaults} } ]
Constructor and Description |
---|
DefaultCacheSettingsManager(BootstrapManager bootstrapManager,
com.atlassian.beehive.ClusterLockService clusterLockService,
String cacheSettingsDefaults,
String cacheSettingsOverrides)
Deprecated.
|
DefaultCacheSettingsManager(BootstrapManager bootstrapManager,
com.atlassian.beehive.ClusterLockService clusterLockService,
String cacheSettingsDefaults,
String cacheSettingsOverrides,
List<String> ignored)
Deprecated.
since 5.9.1
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet()
Deprecated.
|
@NonNull com.atlassian.cache.CacheSettings |
getDefaults(@NonNull String name)
Deprecated.
|
boolean |
saveSettings()
Deprecated.
Persists all changes made so far by update* methods.
|
com.atlassian.fugue.Option<Integer> |
updateMaxEntries(@NonNull String name,
int newValue)
Deprecated.
since 7.0.1. Use
CacheSettingsManager.changeMaxEntries(String, int) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
changeMaxEntries
public DefaultCacheSettingsManager(BootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, String cacheSettingsDefaults, String cacheSettingsOverrides)
@Deprecated public DefaultCacheSettingsManager(BootstrapManager bootstrapManager, com.atlassian.beehive.ClusterLockService clusterLockService, String cacheSettingsDefaults, String cacheSettingsOverrides, List<String> ignored)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
Exception
@Deprecated public com.atlassian.fugue.Option<Integer> updateMaxEntries(@NonNull String name, int newValue)
CacheSettingsManager.changeMaxEntries(String, int)
CacheSettingsManager
updateMaxEntries
in interface CacheSettingsManager
name
- the name of the cache to updatepublic boolean saveSettings()
CacheSettingsManager
saveSettings
in interface CacheSettingsManager
public @NonNull com.atlassian.cache.CacheSettings getDefaults(@NonNull String name)
getDefaults
in interface com.atlassian.cache.CacheSettingsDefaultsProvider
Copyright © 2003–2020 Atlassian. All rights reserved.