|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.confluence.cache.DefaultCacheSettingsManager
public class DefaultCacheSettingsManager
Implementation of 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.
CacheSettingsBuilder.expireAfterAccess hint
CacheSettingsBuilder.expireAfterWrite hint
CacheSettingsBuilder.flushable() hint CacheSettingsBuilder.local() hint CacheSettingsBuilder.maxEntries hint
CacheSettingsBuilder.replicateAsynchronously() hint
CacheSettingsBuilder.replicateViaCopy() hint
// 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 Summary | |
|---|---|
DefaultCacheSettingsManager(BootstrapManager bootstrapManager,
com.atlassian.beehive.ClusterLockService clusterLockService,
String cacheSettingsDefaults,
String cacheSettingsOverrides,
List<String> nonFlushableCaches)
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
com.atlassian.cache.CacheSettings |
getDefaults(String name)
|
com.atlassian.cache.CacheSettings |
obtainDefaults(String name)
Deprecated. |
boolean |
saveSettings()
Persists all changes made so far by update* methods. |
com.atlassian.fugue.Option<Integer> |
updateMaxEntries(String name,
int newValue)
Persists updates to the max entries settings for the specified cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCacheSettingsManager(BootstrapManager bootstrapManager,
com.atlassian.beehive.ClusterLockService clusterLockService,
String cacheSettingsDefaults,
String cacheSettingsOverrides,
List<String> nonFlushableCaches)
throws IOException
IOException| Method Detail |
|---|
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
public com.atlassian.fugue.Option<Integer> updateMaxEntries(String name,
int newValue)
CacheSettingsManager
updateMaxEntries in interface CacheSettingsManagername - the name of the cache to update
public boolean saveSettings()
CacheSettingsManager
saveSettings in interface CacheSettingsManager@Deprecated public com.atlassian.cache.CacheSettings obtainDefaults(String name)
CacheSettingsManager
obtainDefaults in interface CacheSettingsManager
@Nonnull
public com.atlassian.cache.CacheSettings getDefaults(@Nonnull
String name)
getDefaults in interface com.atlassian.cache.CacheSettingsDefaultsProvider
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||