com.atlassian.confluence.cache
Interface CacheSettingsManager

All Known Implementing Classes:
CachingCacheSettingsManager, DefaultCacheSettingsManager

public interface CacheSettingsManager

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(java.lang.String name)
          Obtains cache settings for the specified cache.
 boolean saveSettings()
          Persists all changes made so far by update* methods.
 com.atlassian.fugue.Option<java.lang.Integer> updateMaxEntries(java.lang.String name, int newValue)
          Updates max entries settings for the specified cache.
 

Method Detail

obtainDefaults

com.atlassian.cache.CacheSettings obtainDefaults(@NotNull
                                                 java.lang.String name)
Obtains cache settings for the specified cache.

Parameters:
name - the name of the cache to obtain settings
Returns:
cache settings

updateMaxEntries

com.atlassian.fugue.Option<java.lang.Integer> updateMaxEntries(@NotNull
                                                               java.lang.String name,
                                                               int newValue)
Updates 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-2014 Atlassian. All Rights Reserved.