6 Replies Latest reply on Sep 21, 2006 6:49 AM by Manik Surtani

    Runtime changes of cache config elements

    Manik Surtani Master

      I've created a new annotation to go with org.jboss.cache.config.Configuration - @Dynamic.

      This annotation is applied to fields in the Configuration class and if a setter is called on a Configuration object, if the cache is running and the field the setter modifies does not have the @Dynamic annotation a ConfigurationException is thrown.

      Easy way to control configuration changes on a running cache - the only question is, which elements should be treated as dynamic? :)

      Here is an initial list of the fields:

      private String clusterName = "TreeCache-Group";
       private String clusterConfig = null;
       private boolean useReplQueue = false;
       private int replQueueMaxElements = 1000;
       private long replQueueInterval = 5000;
       private boolean useInterceptorMbeans = true;
       private boolean fetchInMemoryState = true;
       private short replicationVersion = DEFAULT_REPLICATION_VERSION;
       private String replVersionString = Version.getVersionString(DEFAULT_REPLICATION_VERSION);
       private long lockAcquisitionTimeout = 10000;
       private long syncReplTimeout = 15000;
       private String evictionPolicyClass = null;
       private CacheMode cacheMode = CacheMode.LOCAL;
       private boolean inactiveOnStartup = false;
       private String serviceName;
       private long initialStateRetrievalTimeout = 10000;
       private IsolationLevel isolationLevel = IsolationLevel.REPEATABLE_READ;
       private Element evictionPolicyConfig = null;
       private boolean useRegionBasedMarshalling = false;
       private String transactionManagerLookupClass = null;
       private Element cacheLoaderConfiguration = null;
       private boolean syncCommitPhase = false;
       private boolean syncRollbackPhase = false;
       private Element buddyReplicationConfig;
       private boolean nodeLockingOptimistic = false;
       private NodeLockingScheme nodeLockingScheme = NodeLockingScheme.PESSIMISTIC;
       private String muxServiceName = null;
       private String muxStackName = "fc-fast-minimalthreads";