activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r386504 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java
Date Fri, 17 Mar 2006 02:11:36 GMT
Author: chirino
Date: Thu Mar 16 18:11:34 2006
New Revision: 386504

URL: http://svn.apache.org/viewcvs?rev=386504&view=rev
Log:
limit the child when the parent is limited.

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java?rev=386504&r1=386503&r2=386504&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/memory/UsageManager.java
Thu Mar 16 18:11:34 2006
@@ -78,6 +78,8 @@
      * @throws InterruptedException
      */
     public void waitForSpace() throws InterruptedException {
+        if(parent!=null)
+            parent.waitForSpace();
         synchronized (usageMutex) {
             for( int i=0; percentUsage >= 100 ; i++) {
                 usageMutex.wait();
@@ -118,6 +120,8 @@
     }
     
     public boolean isFull() {
+        if(parent!=null && parent.isFull())
+            return true;
         synchronized (usageMutex) {
             return percentUsage >= 100;
         }



Mime
View raw message