com.atlassian.confluence.cache
Class CachingCacheSettingsManager

java.lang.Object
  extended by com.atlassian.confluence.cache.CachingCacheSettingsManager
All Implemented Interfaces:
CacheSettingsManager

@Internal
public class CachingCacheSettingsManager
extends java.lang.Object
implements CacheSettingsManager

Caches calculation of caches settings in order to avoid traversing long list of expensive regexps

Since:
5.6

Constructor Summary
CachingCacheSettingsManager(CacheSettingsManager delegate)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingCacheSettingsManager

public CachingCacheSettingsManager(CacheSettingsManager delegate)
Method Detail

updateMaxEntries

public com.atlassian.fugue.Option<java.lang.Integer> updateMaxEntries(java.lang.String name,
                                                                      int newValue)
Description copied from interface: CacheSettingsManager
Updates max entries settings for the specified cache.

Specified by:
updateMaxEntries in interface CacheSettingsManager
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 interface CacheSettingsManager
Returns:
true if changes were persisted successfully

obtainDefaults

public com.atlassian.cache.CacheSettings obtainDefaults(java.lang.String name)
Description copied from interface: CacheSettingsManager
Obtains cache settings for the specified cache.

Specified by:
obtainDefaults in interface CacheSettingsManager
Parameters:
name - the name of the cache to obtain settings
Returns:
cache settings


Copyright © 2003-2014 Atlassian. All Rights Reserved.