com.atlassian.confluence.cache
Class CachingCacheSettingsManager

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

@Internal
public class CachingCacheSettingsManager
extends 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 getDefaults(String name)
           
 com.atlassian.cache.CacheSettings obtainDefaults(String name)
          Deprecated. 
 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 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<Integer> updateMaxEntries(String name,
                                                            int newValue)
Description copied from interface: CacheSettingsManager
Persists updates to the 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

@Deprecated
public com.atlassian.cache.CacheSettings obtainDefaults(String name)
Deprecated. 

Description copied from interface: CacheSettingsManager
Obtains cache settings for the specified cache.

Specified by:
obtainDefaults in interface CacheSettingsManager

getDefaults

@Nonnull
public com.atlassian.cache.CacheSettings getDefaults(@Nonnull
                                                             String name)
Specified by:
getDefaults in interface com.atlassian.cache.CacheSettingsDefaultsProvider


Copyright © 2003–2015 Atlassian. All rights reserved.