Package com.atlassian.confluence.cache
Interface CacheSettingsManager
- All Superinterfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider
- All Known Implementing Classes:
CachingCacheSettingsManager
,DefaultCacheSettingsManager
,PropertiesFileCacheSettingsManager
public interface CacheSettingsManager
extends com.atlassian.cache.CacheSettingsDefaultsProvider
A manager for cache settings, provides operations for retrieving, runtime update and saving settings to persistent
storage.
At the moment only updating of max entries is supported.
Runtime update is done via calling updateMaxEntries and changes become instantly visible to obtainDefaults.
Persistence is done via calling saveSettings and it stores changes made by all previous calls to update* methods.
-
Method Summary
Modifier and TypeMethodDescriptionchangeMaxEntries
(@NonNull String name, int newValue) Persists updates to the max entries settings for the specified cache.default void
boolean
Persists all changes made so far by update* methods.Methods inherited from interface com.atlassian.cache.CacheSettingsDefaultsProvider
getDefaults
-
Method Details
-
changeMaxEntries
Persists updates to the max entries settings for the specified cache.- Parameters:
name
- the name of the cache to update- Returns:
- the previous value of the specified max entries if any have
- Since:
- 7.0.1
-
saveSettings
boolean saveSettings()Persists all changes made so far by update* methods.- Returns:
- true if changes were persisted successfully
-
reloadSettings
default void reloadSettings()- Since:
- 8.4
-