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
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default Optional<Integer>
changeMaxEntries(@NonNull String name, int newValue)
Persists updates to the max entries settings for the specified cache.boolean
saveSettings()
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.
-
-
-
Method Detail
-
updateMaxEntries
@Deprecated com.atlassian.fugue.Option<Integer> updateMaxEntries(@NonNull String name, int newValue)
Deprecated.since 7.0.1. UsechangeMaxEntries(String, int)
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
-
changeMaxEntries
default Optional<Integer> changeMaxEntries(@NonNull String name, int newValue)
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
-
-