You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-dev@jakarta.apache.org by as...@apache.org on 2004/06/12 04:33:26 UTC

cvs commit: jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/server RemoteCacheClusterMonitor.java

asmuts      2004/06/11 19:33:26

  Modified:    src/java/org/apache/jcs/auxiliary/remote
                        RemoteCacheMonitor.java RemoteCacheListener.java
                        RemoteCacheFailoverRunner.java
                        RemoteCacheFactory.java RemoteCacheAttributes.java
               src/java/org/apache/jcs/auxiliary/remote/server
                        RemoteCacheClusterMonitor.java
  Log:
  Antonio Gallardo's formatting and import cleanup patch.
  
  I may have missed a few things in the patch.  Also, I could not update to the new version of util concurrent in the project.xml, since maven couldn't find the 1.3.4 specified in the patch.
  
  Revision  Changes    Path
  1.6       +1 -1      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java
  
  Index: RemoteCacheMonitor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheMonitor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RemoteCacheMonitor.java	15 Apr 2004 19:22:47 -0000	1.5
  +++ RemoteCacheMonitor.java	12 Jun 2004 02:33:26 -0000	1.6
  @@ -150,7 +150,7 @@
   
               try
               {
  -                Thread.currentThread().sleep( idlePeriod );
  +                Thread.sleep( idlePeriod );
               }
               catch ( InterruptedException ex )
               {
  
  
  
  1.11      +4 -10     jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java
  
  Index: RemoteCacheListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheListener.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- RemoteCacheListener.java	25 May 2004 05:27:42 -0000	1.10
  +++ RemoteCacheListener.java	12 Jun 2004 02:33:26 -0000	1.11
  @@ -20,24 +20,18 @@
   
   import java.io.IOException;
   import java.io.Serializable;
  -
   import java.rmi.RemoteException;
  -
   import java.rmi.server.UnicastRemoteObject;
   
  +import org.apache.commons.logging.Log;
  +import org.apache.commons.logging.LogFactory;
   import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheAttributes;
   import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheConstants;
   import org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener;
  -
  -import org.apache.jcs.engine.behavior.ICache;
   import org.apache.jcs.engine.behavior.ICacheElement;
  -
   import org.apache.jcs.engine.control.CompositeCache;
   import org.apache.jcs.engine.control.CompositeCacheManager;
   
  -import org.apache.commons.logging.Log;
  -import org.apache.commons.logging.LogFactory;
  -
   // remove
   
   /**
  @@ -241,7 +235,7 @@
           }
   
           getCacheManager();
  -        CompositeCache cache = ( CompositeCache ) cacheMgr.getCache( cacheName );
  +        CompositeCache cache = cacheMgr.getCache( cacheName );
   
           cache.localRemove( key );
       }
  @@ -269,7 +263,7 @@
           {
               log.debug( "handleDispose> cacheName=" + cacheName );
           }
  -        CompositeCacheManager cm = ( CompositeCacheManager ) cacheMgr;
  +        CompositeCacheManager cm = cacheMgr;
           cm.freeCache( cacheName, true);
       }
   
  
  
  
  1.5       +1 -1      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java
  
  Index: RemoteCacheFailoverRunner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFailoverRunner.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RemoteCacheFailoverRunner.java	15 Apr 2004 19:22:47 -0000	1.4
  +++ RemoteCacheFailoverRunner.java	12 Jun 2004 02:33:26 -0000	1.5
  @@ -204,7 +204,7 @@
               try
               {
                   log.debug( "cache failover runner sleeping for " + idlePeriod );
  -                Thread.currentThread().sleep( idlePeriod );
  +                Thread.sleep( idlePeriod );
               }
               catch ( InterruptedException ex )
               {
  
  
  
  1.7       +3 -3      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java
  
  Index: RemoteCacheFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheFactory.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RemoteCacheFactory.java	15 Apr 2004 19:22:47 -0000	1.6
  +++ RemoteCacheFactory.java	12 Jun 2004 02:33:26 -0000	1.7
  @@ -60,7 +60,7 @@
           ArrayList noWaits = new ArrayList();
   
           // if LOCAL
  -        if ( rca.getRemoteType() == rca.LOCAL )
  +        if ( rca.getRemoteType() == RemoteCacheAttributes.LOCAL )
           {
   
               // a list toi be turned into an array of failover server information
  @@ -127,7 +127,7 @@
               // if CLUSTER
           }
           else
  -            if ( rca.getRemoteType() == rca.CLUSTER )
  +            if ( rca.getRemoteType() == RemoteCacheAttributes.CLUSTER )
           {
   
               // REGISTER LISTENERS FOR EACH SYSTEM CLUSTERED CACHEs
  @@ -140,7 +140,7 @@
                   rca.setRemoteHost( server.substring( 0, server.indexOf( ":" ) ) );
                   rca.setRemotePort( Integer.parseInt( server.substring( server.indexOf( ":" ) + 1 ) ) );
                   RemoteCacheManager rcm = RemoteCacheManager.getInstance( rca );
  -                rca.setRemoteType( rca.CLUSTER );
  +                rca.setRemoteType( RemoteCacheAttributes.CLUSTER );
                   ICache ic = rcm.getCache( rca );
                   if ( ic != null )
                   {
  
  
  
  1.5       +1 -1      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheAttributes.java
  
  Index: RemoteCacheAttributes.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/RemoteCacheAttributes.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RemoteCacheAttributes.java	15 Apr 2004 19:22:47 -0000	1.4
  +++ RemoteCacheAttributes.java	12 Jun 2004 02:33:26 -0000	1.5
  @@ -219,7 +219,7 @@
           catch ( Exception e )
           {
           }
  -        return ( AuxiliaryCacheAttributes ) this;
  +        return this;
       }
   
   
  
  
  
  1.6       +1 -1      jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/server/RemoteCacheClusterMonitor.java
  
  Index: RemoteCacheClusterMonitor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-jcs/src/java/org/apache/jcs/auxiliary/remote/server/RemoteCacheClusterMonitor.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RemoteCacheClusterMonitor.java	15 Apr 2004 19:22:51 -0000	1.5
  +++ RemoteCacheClusterMonitor.java	12 Jun 2004 02:33:26 -0000	1.6
  @@ -136,7 +136,7 @@
               try
               {
   //      p("cache monitor sleeping for " + idlePeriod);
  -                Thread.currentThread().sleep( idlePeriod );
  +                Thread.sleep( idlePeriod );
               }
               catch ( InterruptedException ex )
               {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-jcs-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-jcs-dev-help@jakarta.apache.org