tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fha...@apache.org
Subject svn commit: r777210 - /tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
Date Thu, 21 May 2009 18:35:40 GMT
Author: fhanik
Date: Thu May 21 18:35:40 2009
New Revision: 777210

URL: http://svn.apache.org/viewvc?rev=777210&view=rev
Log:
Consolidate the use of service start time into one local variable
https://issues.apache.org/bugzilla/show_bug.cgi?id=47234


Modified:
    tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java

Modified: tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=777210&r1=777209&r2=777210&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java (original)
+++ tomcat/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java Thu May
21 18:35:40 2009
@@ -115,11 +115,6 @@
     protected SenderThread sender;
 
     /**
-     * When was the service started
-     */
-    protected long serviceStartTime = System.currentTimeMillis();
-    
-    /**
      * Time to live for the multicast packets that are being sent out
      */
     protected int mcastTTL = -1;
@@ -267,7 +262,6 @@
             //make sure at least one packet gets out there
             send(false);
             doRunSender = true;
-            serviceStartTime = System.currentTimeMillis();
             sender = new SenderThread(sendFrequency);
             sender.setDaemon(true);
             sender.start();
@@ -324,7 +318,7 @@
             //leave mcast group
             try {socket.leaveGroup(address);}catch ( Exception ignore){}
             try {socket.close();}catch ( Exception ignore){}
-            serviceStartTime = Long.MAX_VALUE;
+            member.setServiceStartTime(-1);
         }
         return (startLevel == 0);
     }
@@ -496,7 +490,7 @@
     }
 
     public long getServiceStartTime() {
-       return this.serviceStartTime;
+        return (member!=null) ? member.getServiceStartTime() : -1l;
     }
 
     public int getRecoveryCounter() {



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


Mime
View raw message