Class DefaultCacheSettingsManager

java.lang.Object
com.atlassian.confluence.cache.DefaultCacheSettingsManager
All Implemented Interfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider, CacheSettingsManager, org.springframework.beans.factory.InitializingBean

public class DefaultCacheSettingsManager extends Object implements CacheSettingsManager, org.springframework.beans.factory.InitializingBean
An implementation of CacheSettingsManager which delegates to another CacheSettingsDefaultsProvider to provide the default cache config, and another CacheSettingsManager to handle the site-specific settings overrides.
See Also:
  • Constructor Details

  • Method Details

    • afterPropertiesSet

      @Deprecated public void afterPropertiesSet()
      Deprecated.
      since 7.12
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • changeMaxEntries

      public Optional<Integer> changeMaxEntries(@NonNull String name, int newValue)
      Change the max entries for a cache. Returns the previous value if it was set, or null if it was not set.
      Specified by:
      changeMaxEntries in interface CacheSettingsManager
      Parameters:
      name - the name of the cache to update
      newValue -
      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
    • reloadSettings

      public void reloadSettings()
      Specified by:
      reloadSettings in interface CacheSettingsManager
    • getDefaults

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