Class PropertiesFileCacheSettingsManager

java.lang.Object
com.atlassian.confluence.impl.cache.config.PropertiesFileCacheSettingsManager
All Implemented Interfaces:
com.atlassian.cache.CacheSettingsDefaultsProvider, CacheSettingsManager

public final class PropertiesFileCacheSettingsManager extends Object implements CacheSettingsManager
Since:
7.5
  • Constructor Details

    • PropertiesFileCacheSettingsManager

      public PropertiesFileCacheSettingsManager(com.atlassian.dc.filestore.api.FileStore.Path settingsFile, com.atlassian.beehive.ClusterLockService clusterLockService)
  • Method Details

    • changeMaxEntries

      public Optional<Integer> changeMaxEntries(@NonNull String name, int newValue)
      Description copied from interface: CacheSettingsManager
      Persists updates to the max entries settings for the specified cache.

      Specified by:
      changeMaxEntries 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
    • 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