com.atlassian.confluence.cache
Class DefaultCacheConfigManager

java.lang.Object
  extended by com.atlassian.confluence.cache.DefaultCacheConfigManager
All Implemented Interfaces:
CacheConfigManager, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean

public class DefaultCacheConfigManager
extends Object
implements CacheConfigManager, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean


Constructor Summary
DefaultCacheConfigManager(CacheSettingsManager cacheSettingsManager, com.atlassian.cache.CacheManager cacheManager, com.atlassian.event.api.EventPublisher eventPublisher)
           
 
Method Summary
 void afterPropertiesSet()
           
 void changeMaxCacheSize(String name, int newValue)
          Changes the max cache size.
 void destroy()
           
 void onMaxEntriesSettingChanged(ClusterEventWrapper clusterEventWrapper)
          Listen to cluster wide event about changing of max entries setting only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCacheConfigManager

public DefaultCacheConfigManager(CacheSettingsManager cacheSettingsManager,
                                 com.atlassian.cache.CacheManager cacheManager,
                                 com.atlassian.event.api.EventPublisher eventPublisher)
Method Detail

changeMaxCacheSize

public void changeMaxCacheSize(String name,
                               int newValue)
Description copied from interface: CacheConfigManager
Changes the max cache size.

Specified by:
changeMaxCacheSize in interface CacheConfigManager
Parameters:
name - cache name
newValue - new max cache size

onMaxEntriesSettingChanged

@EventListener
public void onMaxEntriesSettingChanged(ClusterEventWrapper clusterEventWrapper)
Listen to cluster wide event about changing of max entries setting only. This should only ever happen for local caches, since distributed ones are centrally managed and only require updating from one node.


afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Throws:
Exception

destroy

public void destroy()
             throws Exception
Specified by:
destroy in interface org.springframework.beans.factory.DisposableBean
Throws:
Exception


Copyright © 2003–2015 Atlassian. All rights reserved.