activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r649551 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java
Date Fri, 18 Apr 2008 14:28:19 GMT
Author: rajdavies
Date: Fri Apr 18 07:28:12 2008
New Revision: 649551

URL: http://svn.apache.org/viewvc?rev=649551&view=rev
Log:
update percentUsage correctly

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java?rev=649551&r1=649550&r2=649551&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/usage/Usage.java Fri Apr
18 07:28:12 2008
@@ -89,12 +89,12 @@
             }
         }
         synchronized (usageMutex) {
-            caclPercentUsage();
+            percentUsage=caclPercentUsage();
             if (percentUsage >= 100) {
                 long deadline = timeout > 0 ? System.currentTimeMillis() + timeout : Long.MAX_VALUE;
                 long timeleft = deadline;
                 while (timeleft > 0) {
-                    caclPercentUsage();
+                    percentUsage=caclPercentUsage();
                     if (percentUsage >= 100) {
                         usageMutex.wait(pollingTime);
                         timeleft = deadline - System.currentTimeMillis();
@@ -112,7 +112,7 @@
             return true;
         }
         synchronized (usageMutex) {
-            caclPercentUsage();
+            percentUsage=caclPercentUsage();
             return percentUsage >= 100;
         }
     }



Mime
View raw message