Author: rjung
Date: Tue Jun 30 15:36:21 2009
New Revision: 789800

URL: http://svn.apache.org/viewvc?rev=789800&view=rev
Log:
Tab and trailing whitespace police - no functional change.

Modified:
    
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
    
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java?rev=789800&r1=789799&r2=789800&view=diff
==============================================================================
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/mcast/McastServiceImpl.java
 Tue Jun 30 15:36:21 2009
@@ -102,7 +102,7 @@
      * When was the service started
      */
     protected long serviceStartTime = System.currentTimeMillis();
-    
+
     protected int mcastTTL = -1;
     protected int mcastSoTimeout = -1;
     protected InetAddress mcastBindAddress = null;
@@ -111,17 +111,17 @@
      * nr of times the system has to fail before a recovery is initiated
      */
     protected int recoveryCounter = 10;
-    
+
     /**
      * The time the recovery thread sleeps between recovery attempts
      */
     protected long recoverySleepTime = 5000;
-    
+
     /**
      * Add the ability to turn on/off recovery
      */
     protected boolean recoveryEnabled = true;
-    
+
     /**
      * Create a new mcast service impl
      * @param member - the local member
@@ -166,11 +166,11 @@
         receivePacket.setPort(port);
         if(membership == null) membership = new 
McastMembership(member.getName());
     }
-    
+
     protected void setupSocket() throws IOException {
         if (mcastBindAddress != null) {
             try {
-                       if(log.isInfoEnabled())
+                if(log.isInfoEnabled())
                     log.info("Attempting to bind the multicast socket to 
"+address+":"+port);
                 socket = new MulticastSocket(new 
InetSocketAddress(address,port));
             } catch (BindException e) {
@@ -187,7 +187,7 @@
         }
         socket.setLoopbackMode(false); //hint that we don't need loop back 
messages
         if (mcastBindAddress != null) {
-                       if(log.isInfoEnabled())
+            if(log.isInfoEnabled())
                 log.info("Setting multihome multicast interface to:" +
                          mcastBindAddress);
             socket.setInterface(mcastBindAddress);
@@ -198,7 +198,7 @@
             log.info("Setting cluster mcast soTimeout to "+mcastSoTimeout);
         socket.setSoTimeout(mcastSoTimeout);
         if ( mcastTTL >= 0 ) {
-                       if(log.isInfoEnabled())
+            if(log.isInfoEnabled())
                 log.info("Setting cluster mcast TTL to " + mcastTTL);
             socket.setTimeToLive(mcastTTL);
         }
@@ -224,7 +224,7 @@
             sender = new SenderThread(sendFrequency);
             sender.setDaemon(true);
             sender.start();
-            
+
         }
     }
 
@@ -332,14 +332,14 @@
     public void setRecoverySleepTime(long recoverySleepTime) {
         this.recoverySleepTime = recoverySleepTime;
     }
-    
+
     public class ReceiverThread extends Thread {
-        
+
         public ReceiverThread() {
             super();
             setName("Cluster-MembershipReceiver");
         }
-        
+
         public void run() {
             int errorCounter = 0 ;
             while ( doRun ) {
@@ -347,7 +347,7 @@
                     receive();
                     errorCounter = 0;
                 } catch ( Exception x ) {
-                    if (errorCounter==0) { 
+                    if (errorCounter==0) {
                         if(! (x instanceof SocketTimeoutException))
                             log.warn("Error receiving mcast package 
(errorCounter=" +errorCounter+ "). Sleeping " +sendFrequency + " ms",x);
                     } else {
@@ -364,22 +364,22 @@
                 }
             }
             log.warn("Receiver Thread ends with errorCounter=" +errorCounter+ 
".");
-            
+
         }
     }
 
     public class SenderThread extends Thread {
-        
+
         long time;
-        
+
         McastServiceImpl service ;
-        
+
         public SenderThread(long time) {
             this.time = time;
             setName("Cluster-MembershipSender");
 
         }
-        
+
         public void run() {
             int errorCounter = 0 ;
             while ( doRun ) {
@@ -402,20 +402,20 @@
                 try { Thread.sleep(time); } catch ( Exception ignore ) {}
             }
             log.warn("Sender Thread ends with errorCounter=" +errorCounter+ 
".");
-        }       
+        }
     }
-    
+
     protected static class RecoveryThread extends Thread {
-        
+
         static boolean running = false;
-        
+
         McastServiceImpl parent = null;
-       
+
         public RecoveryThread(McastServiceImpl parent) {
             this.parent = parent;
             if (!init(this)) this.parent = null;
         }
-        
+
         public static synchronized boolean init(RecoveryThread t) {
             if ( running ) {
                 return false;
@@ -439,7 +439,7 @@
                 return false;
             }
         }
-        
+
         public boolean startService() {
             try {
                 parent.init();
@@ -451,7 +451,7 @@
                 return false;
             }
         }
-        
+
         public void run() {
             boolean success = false;
             int attempt = 0;

Modified: 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java?rev=789800&r1=789799&r2=789800&view=diff
==============================================================================
--- 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java
 (original)
+++ 
tomcat/sandbox/tomcat-oacc/trunk/src/share/org/apache/catalina/cluster/membership/McastServiceImpl.java
 Tue Jun 30 15:36:21 2009
@@ -49,12 +49,12 @@
      * Receiver thread are listens to the multicasting socket.
      */
     protected boolean doRunReceiver = false;
-    
+
     /**
      * Sender thread are listens to the multicasting socket.
      */
     protected boolean doRunSender = false;
-    
+
     /**
      * Socket that we intend to listen to
      */
@@ -108,7 +108,7 @@
      * When was the service started
      */
     protected long serviceStartTime = System.currentTimeMillis();
-    
+
     protected int mcastTTL = -1;
     protected int mcastSoTimeout = -1;
     protected InetAddress mcastBindAddress = null;
@@ -117,17 +117,17 @@
      * nr of times the system has to fail before a recovery is initiated
      */
     protected int recoveryCounter = 10;
-    
+
     /**
      * The time the recovery thread sleeps between recovery attempts
      */
     protected long recoverySleepTime = 5000;
-    
+
     /**
      * Add the ability to turn on/off recovery
      */
     protected boolean recoveryEnabled = true;
-    
+
     /**
      * Create a new mcast service impl
      * @param member - the local member
@@ -172,13 +172,13 @@
         receivePacket.setPort(port);
         if(membership == null) membership = new 
McastMembership(member.getName());
     }
-    
+
     protected void destroy() throws IOException {
         stop();
         membership.reset() ;
         membership = null ;
     }
-    
+
     protected void setupSocket() throws IOException {
         if (mcastBindAddress != null) {
             try {
@@ -199,7 +199,7 @@
         }
         socket.setLoopbackMode(false); //hint that we don't need loop back 
messages
         if (mcastBindAddress != null) {
-                       if(log.isInfoEnabled())
+            if(log.isInfoEnabled())
                 log.info("Setting multihome multicast interface to:" +
                          mcastBindAddress);
             socket.setInterface(mcastBindAddress);
@@ -210,7 +210,7 @@
             log.info("Setting cluster mcast soTimeout to "+mcastSoTimeout);
         socket.setSoTimeout(mcastSoTimeout);
         if ( mcastTTL >= 0 ) {
-                       if(log.isInfoEnabled())
+            if(log.isInfoEnabled())
                 log.info("Setting cluster mcast TTL to " + mcastTTL);
             socket.setTimeToLive(mcastTTL);
         }
@@ -236,10 +236,10 @@
             doRunSender = true;
             sender = new SenderThread(sendFrequency);
             sender.setDaemon(true);
-            sender.start();        
+            sender.start();
         }
     }
-    
+
     /**
      * Stops the service
      * @throws IOException if the service fails to disconnect from the sockets
@@ -248,7 +248,7 @@
         stop(1) ;
         stop(2) ;
     }
-    
+
     /**
      * Stops the service
      * @throws IOException if the service fails to disconnect from the sockets
@@ -261,7 +261,7 @@
             doRunReceiver = false;
             if ( receiver !=null ) receiver.interrupt();
             receiver = null;
-          
+
        }
        if(level == 2 ) {
            valid = true;
@@ -377,14 +377,14 @@
     public void setRecoverySleepTime(long recoverySleepTime) {
         this.recoverySleepTime = recoverySleepTime;
     }
-    
+
     public class ReceiverThread extends Thread {
-        
+
         public ReceiverThread() {
             super();
             setName("Cluster-MembershipReceiver");
         }
-        
+
         public void run() {
             int errorCounter = 0 ;
             while ( doRunReceiver ) {
@@ -392,7 +392,7 @@
                     receive();
                     errorCounter = 0;
                 } catch ( Exception x ) {
-                    if (errorCounter==0) { 
+                    if (errorCounter==0) {
                         if(! (x instanceof SocketTimeoutException))
                             log.warn("Error receiving mcast package 
(errorCounter=" +errorCounter+ "). Sleeping " +sendFrequency + " ms",x);
                     } else {
@@ -409,22 +409,22 @@
                 }
             }
             log.warn("Receiver Thread ends with errorCounter=" +errorCounter+ 
".");
-            
+
         }
     }
 
     public class SenderThread extends Thread {
-        
+
         long time;
-        
+
         McastServiceImpl service ;
-        
+
         public SenderThread(long time) {
             this.time = time;
             setName("Cluster-MembershipSender");
 
         }
-        
+
         public void run() {
             int errorCounter = 0 ;
             while ( doRunSender ) {
@@ -447,20 +447,20 @@
                 try { Thread.sleep(time); } catch ( Exception ignore ) {}
             }
             log.warn("Sender Thread ends with errorCounter=" +errorCounter+ 
".");
-        }       
+        }
     }
-    
+
     protected static class RecoveryThread extends Thread {
-        
+
         static boolean running = false;
-        
+
         McastServiceImpl parent = null;
-       
+
         public RecoveryThread(McastServiceImpl parent) {
             this.parent = parent;
             if (!init(this)) this.parent = null;
         }
-        
+
         public static synchronized boolean init(RecoveryThread t) {
             if ( running ) {
                 return false;
@@ -484,7 +484,7 @@
                 return false;
             }
         }
-        
+
         public boolean startService() {
             try {
                 parent.init();
@@ -496,7 +496,7 @@
                 return false;
             }
         }
-        
+
         public void run() {
             boolean success = false;
             int attempt = 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to