[jboss-cvs] JBossCache/src/org/jboss/cache/config ...

Manik Surtani msurtani at jboss.com
Wed Sep 6 10:45:41 EDT 2006


  User: msurtani
  Date: 06/09/06 10:45:41

  Modified:    src/org/jboss/cache/config  Configuration.java
  Log:
  fixed JMX tests, added more JMX tests
  
  Revision  Changes    Path
  1.16      +548 -466  JBossCache/src/org/jboss/cache/config/Configuration.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Configuration.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/config/Configuration.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- Configuration.java	17 Aug 2006 14:29:24 -0000	1.15
  +++ Configuration.java	6 Sep 2006 14:45:41 -0000	1.16
  @@ -22,9 +22,13 @@
    */
   public class Configuration
   {
  -    public enum CacheMode { LOCAL, REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC, INVALIDATION_ASYNC }
  +   public enum CacheMode
  +   {
  +      LOCAL, REPL_SYNC, REPL_ASYNC, INVALIDATION_SYNC, INVALIDATION_ASYNC }
   
  -    public enum NodeLockingScheme{ PESSIMISTIC, OPTIMISTIC }
  +   public enum NodeLockingScheme
  +   {
  +      PESSIMISTIC, OPTIMISTIC }
   
       private Log log = LogFactory.getLog(Configuration.class);
   
  @@ -323,7 +327,7 @@
           this.cacheMode = CacheMode.valueOf(cacheMode.toUpperCase());
           if (this.cacheMode == null)
           {
  -            log.warn("Unknown cache mode '"+cacheMode+"', using defaults.");
  +         log.warn("Unknown cache mode '" + cacheMode + "', using defaults.");
               this.cacheMode = CacheMode.LOCAL;
           }
       }
  @@ -337,6 +341,7 @@
       {
           this.inactiveOnStartup = inactiveOnStartup;
       }
  +
       public IsolationLevel getIsolationLevel()
       {
           return isolationLevel;
  @@ -450,11 +455,12 @@
   
       public void setNodeLockingScheme(String nodeLockingScheme)
       {
  -        if (nodeLockingScheme == null) throw new ConfigurationException("Node locking scheme cannot be null", "NodeLockingScheme");
  +      if (nodeLockingScheme == null)
  +         throw new ConfigurationException("Node locking scheme cannot be null", "NodeLockingScheme");
           this.nodeLockingScheme = NodeLockingScheme.valueOf(nodeLockingScheme.toUpperCase());
           if (this.nodeLockingScheme == null)
           {
  -            log.warn("Unknown node locking scheme '"+nodeLockingScheme+"', using defaults.");
  +         log.warn("Unknown node locking scheme '" + nodeLockingScheme + "', using defaults.");
               this.nodeLockingScheme = NodeLockingScheme.PESSIMISTIC;
           }
           
  @@ -467,7 +473,7 @@
           this.isolationLevel = IsolationLevel.valueOf(isolationLevel.toUpperCase());
           if (this.isolationLevel == null)
           {
  -            log.warn("Unknown isolation level '"+isolationLevel+"', using defaults.");
  +         log.warn("Unknown isolation level '" + isolationLevel + "', using defaults.");
               this.isolationLevel = IsolationLevel.REPEATABLE_READ;
           }
       }
  @@ -492,4 +498,80 @@
           this.muxServiceName = serviceName;
       }
   
  +   public boolean equals(Object o)
  +   {
  +      if (this == o) return true;
  +      if (o == null || getClass() != o.getClass()) return false;
  +
  +      final Configuration that = (Configuration) o;
  +
  +      if (fetchInMemoryState != that.fetchInMemoryState) return false;
  +      if (inactiveOnStartup != that.inactiveOnStartup) return false;
  +      if (initialStateRetrievalTimeout != that.initialStateRetrievalTimeout) return false;
  +      if (lockAcquisitionTimeout != that.lockAcquisitionTimeout) return false;
  +      if (nodeLockingOptimistic != that.nodeLockingOptimistic) return false;
  +      if (replQueueInterval != that.replQueueInterval) return false;
  +      if (replQueueMaxElements != that.replQueueMaxElements) return false;
  +      if (replicationVersion != that.replicationVersion) return false;
  +      if (syncCommitPhase != that.syncCommitPhase) return false;
  +      if (syncReplTimeout != that.syncReplTimeout) return false;
  +      if (syncRollbackPhase != that.syncRollbackPhase) return false;
  +      if (useInterceptorMbeans != that.useInterceptorMbeans) return false;
  +      if (useRegionBasedMarshalling != that.useRegionBasedMarshalling) return false;
  +      if (useReplQueue != that.useReplQueue) return false;
  +      if (buddyReplicationConfig != null ? !buddyReplicationConfig.equals(that.buddyReplicationConfig) : that.buddyReplicationConfig != null)
  +         return false;
  +      if (cacheLoaderConfiguration != null ? !cacheLoaderConfiguration.equals(that.cacheLoaderConfiguration) : that.cacheLoaderConfiguration != null)
  +         return false;
  +      if (cacheMode != that.cacheMode) return false;
  +      if (clusterConfig != null ? !clusterConfig.equals(that.clusterConfig) : that.clusterConfig != null) return false;
  +      if (clusterName != null ? !clusterName.equals(that.clusterName) : that.clusterName != null) return false;
  +      if (evictionPolicyClass != null ? !evictionPolicyClass.equals(that.evictionPolicyClass) : that.evictionPolicyClass != null)
  +         return false;
  +      if (evictionPolicyConfig != null ? !evictionPolicyConfig.equals(that.evictionPolicyConfig) : that.evictionPolicyConfig != null)
  +         return false;
  +      if (isolationLevel != that.isolationLevel) return false;
  +      if (muxServiceName != null ? !muxServiceName.equals(that.muxServiceName) : that.muxServiceName != null)
  +         return false;
  +      if (muxStackName != null ? !muxStackName.equals(that.muxStackName) : that.muxStackName != null) return false;
  +      if (nodeLockingScheme != that.nodeLockingScheme) return false;
  +      if (transactionManagerLookupClass != null ? !transactionManagerLookupClass.equals(that.transactionManagerLookupClass) : that.transactionManagerLookupClass != null)
  +         return false;
  +
  +      return true;
  +   }
  +
  +   public int hashCode()
  +   {
  +      int result;
  +      result = (clusterName != null ? clusterName.hashCode() : 0);
  +      result = 29 * result + (clusterConfig != null ? clusterConfig.hashCode() : 0);
  +      result = 29 * result + (useReplQueue ? 1 : 0);
  +      result = 29 * result + replQueueMaxElements;
  +      result = 29 * result + (int) (replQueueInterval ^ (replQueueInterval >>> 32));
  +      result = 29 * result + (useInterceptorMbeans ? 1 : 0);
  +      result = 29 * result + (fetchInMemoryState ? 1 : 0);
  +      result = 29 * result + (int) replicationVersion;
  +      result = 29 * result + (int) (lockAcquisitionTimeout ^ (lockAcquisitionTimeout >>> 32));
  +      result = 29 * result + (int) (syncReplTimeout ^ (syncReplTimeout >>> 32));
  +      result = 29 * result + (evictionPolicyClass != null ? evictionPolicyClass.hashCode() : 0);
  +      result = 29 * result + (cacheMode != null ? cacheMode.hashCode() : 0);
  +      result = 29 * result + (inactiveOnStartup ? 1 : 0);
  +      result = 29 * result + (int) (initialStateRetrievalTimeout ^ (initialStateRetrievalTimeout >>> 32));
  +      result = 29 * result + (isolationLevel != null ? isolationLevel.hashCode() : 0);
  +      result = 29 * result + (evictionPolicyConfig != null ? evictionPolicyConfig.hashCode() : 0);
  +      result = 29 * result + (useRegionBasedMarshalling ? 1 : 0);
  +      result = 29 * result + (transactionManagerLookupClass != null ? transactionManagerLookupClass.hashCode() : 0);
  +      result = 29 * result + (cacheLoaderConfiguration != null ? cacheLoaderConfiguration.hashCode() : 0);
  +      result = 29 * result + (syncCommitPhase ? 1 : 0);
  +      result = 29 * result + (syncRollbackPhase ? 1 : 0);
  +      result = 29 * result + (buddyReplicationConfig != null ? buddyReplicationConfig.hashCode() : 0);
  +      result = 29 * result + (nodeLockingOptimistic ? 1 : 0);
  +      result = 29 * result + (nodeLockingScheme != null ? nodeLockingScheme.hashCode() : 0);
  +      result = 29 * result + (muxServiceName != null ? muxServiceName.hashCode() : 0);
  +      result = 29 * result + (muxStackName != null ? muxStackName.hashCode() : 0);
  +      return result;
  +   }
  +
  +
   }
  
  
  



More information about the jboss-cvs-commits mailing list