Class PropertiesFileCacheSettingsManager
- java.lang.Object
-
- com.atlassian.confluence.impl.cache.config.PropertiesFileCacheSettingsManager
-
- All Implemented Interfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider,CacheSettingsManager
public final class PropertiesFileCacheSettingsManager extends Object implements CacheSettingsManager
- Since:
- 7.5
-
-
Constructor Summary
Constructors Constructor Description PropertiesFileCacheSettingsManager(com.atlassian.dc.filestore.api.FileStore.Path settingsFile, Lock writeLock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.atlassian.cache.CacheSettingsgetDefaults(String cacheName)booleansaveSettings()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
-
Methods inherited from interface com.atlassian.confluence.cache.CacheSettingsManager
changeMaxEntries
-
-
-
-
Constructor Detail
-
PropertiesFileCacheSettingsManager
public PropertiesFileCacheSettingsManager(com.atlassian.dc.filestore.api.FileStore.Path settingsFile, Lock writeLock)
-
-
Method Detail
-
updateMaxEntries
public com.atlassian.fugue.Option<Integer> updateMaxEntries(@Nonnull String name, int newValue)
Description copied from interface:CacheSettingsManagerPersists updates to the max entries settings for the specified cache.- Specified by:
updateMaxEntriesin interfaceCacheSettingsManager- Parameters:
name- the name of the cache to update- Returns:
- the previous value of the specified max entries if any have
-
saveSettings
public boolean saveSettings()
Description copied from interface:CacheSettingsManagerPersists all changes made so far by update* methods.- Specified by:
saveSettingsin interfaceCacheSettingsManager- Returns:
- true if changes were persisted successfully
-
getDefaults
@Nonnull public com.atlassian.cache.CacheSettings getDefaults(@Nonnull String cacheName)- Specified by:
getDefaultsin interfacecom.atlassian.cache.CacheSettingsDefaultsProvider
-
-