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, com.atlassian.beehive.ClusterLockService clusterLockService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<Integer>
changeMaxEntries(@NonNull String name, int newValue)
Persists updates to the max entries settings for the specified 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
-
-
-
-
Method Detail
-
changeMaxEntries
public Optional<Integer> changeMaxEntries(@NonNull String name, int newValue)
Description copied from interface:CacheSettingsManager
Persists updates to the max entries settings for the specified cache.- Specified by:
changeMaxEntries
in 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: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
-
-