com.atlassian.confluence.cache
Interface CacheSettingsManager

All Superinterfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider
All Known Implementing Classes:
CachingCacheSettingsManager, DefaultCacheSettingsManager

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
 com.atlassian.cache.CacheSettings obtainDefaults(String name)
          Deprecated. since 5.7 use CacheSettingsDefaultsProvider.getDefaults(String)
 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 interface com.atlassian.cache.CacheSettingsDefaultsProvider
getDefaults
 

Method Detail

obtainDefaults

@Deprecated
com.atlassian.cache.CacheSettings obtainDefaults(@NotNull
                                                            String name)
Deprecated. since 5.7 use CacheSettingsDefaultsProvider.getDefaults(String)

Obtains cache settings for the specified cache.


updateMaxEntries

com.atlassian.fugue.Option<Integer> updateMaxEntries(@NotNull
                                                     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

saveSettings

boolean saveSettings()
Persists all changes made so far by update* methods.

Returns:
true if changes were persisted successfully


Copyright © 2003–2015 Atlassian. All rights reserved.