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;
| @Dynamic
| private int replQueueMaxElements = 1000;
| @Dynamic
| 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);
| @Dynamic
| private long lockAcquisitionTimeout = 10000;
| @Dynamic
| 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;
| @Dynamic
| private Element evictionPolicyConfig = null;
| private boolean useRegionBasedMarshalling = false;
| private String transactionManagerLookupClass = null;
| private Element cacheLoaderConfiguration = null;
| @Dynamic
| private boolean syncCommitPhase = false;
| @Dynamic
| 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";
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3971301#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...