activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r602553 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
Date Sat, 08 Dec 2007 21:31:15 GMT
Author: chirino
Date: Sat Dec  8 13:31:14 2007
New Revision: 602553

URL: http://svn.apache.org/viewvc?rev=602553&view=rev
Log:
Added a little more debug logging to the InactivityMonitor because I suspect that
the schedular might not be triggering the read and write checks at the right time. 

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java?rev=602553&r1=602552&r2=602553&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/InactivityMonitor.java
Sat Dec  8 13:31:14 2007
@@ -46,13 +46,25 @@
     private final AtomicBoolean inReceive = new AtomicBoolean(false);
 
     private final Runnable readChecker = new Runnable() {
+        long lastRunTime;
         public void run() {
+            long now = System.currentTimeMillis();
+            if( lastRunTime != 0 && LOG.isDebugEnabled() ) {
+                LOG.debug(""+(now-lastRunTime)+" ms elapsed since last read check.");
+            }
+            lastRunTime = now; 
             readCheck();
         }
     };
 
     private final Runnable writeChecker = new Runnable() {
+        long lastRunTime;
         public void run() {
+            long now = System.currentTimeMillis();
+            if( lastRunTime != 0 && LOG.isDebugEnabled() ) {
+                LOG.debug(""+(now-lastRunTime)+" ms elapsed since last read check.");
+            }
+            lastRunTime = now; 
             writeCheck();
         }
     };



Mime
View raw message