qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject svn commit: r888248 - in /qpid/trunk/qpid/java: broker/src/main/java/org/apache/qpid/server/queue/ broker/src/test/java/org/apache/qpid/server/queue/ management/common/src/main/java/org/apache/qpid/management/common/mbeans/ management/eclipse-plugin/sr...
Date Tue, 08 Dec 2009 04:03:51 GMT
Author: robbie
Date: Tue Dec  8 04:03:50 2009
New Revision: 888248

URL: http://svn.apache.org/viewvc?rev=888248&view=rev
Log:
QPID-2177: expose Capacity, FlowResumeCapacity, and FlowOverfull as attributes of the Queue
MBeans

Modified:
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
    qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
    qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
    qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
    qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
    qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java (original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueue.java Tue
Dec  8 04:03:50 2009
@@ -186,7 +186,7 @@
 
     void setFlowResumeCapacity(long flowResumeCapacity);
 
-
+    boolean isOverfull();
 
     void deleteMessageFromTop();
 

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
Tue Dec  8 04:03:50 2009
@@ -241,6 +241,41 @@
         return _queue.getQueueDepth();
     }
 
+    public Long getCapacity()
+    {
+        return _queue.getCapacity();
+    }
+
+    public void setCapacity(Long capacity) throws IllegalArgumentException
+    {
+        if( _queue.getFlowResumeCapacity() > capacity )
+        {
+            throw new IllegalArgumentException("Capacity must not be less than FlowResumeCapacity");
+        }
+        
+    	_queue.setCapacity(capacity);
+    }
+
+    public Long getFlowResumeCapacity()
+    {
+        return _queue.getFlowResumeCapacity();
+    }
+
+    public void setFlowResumeCapacity(Long flowResumeCapacity) throws IllegalArgumentException
+    {
+        if( _queue.getCapacity() < flowResumeCapacity )
+        {
+            throw new IllegalArgumentException("FlowResumeCapacity must not exceed Capacity");
+        }
+        
+        _queue.setFlowResumeCapacity(flowResumeCapacity);
+    }
+    
+    public boolean isFlowOverfull()
+    {
+        return _queue.isOverfull();
+    }
+
     /**
      * Checks if there is any notification to be send to the listeners
      */

Modified: qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
(original)
+++ qpid/trunk/qpid/java/broker/src/main/java/org/apache/qpid/server/queue/SimpleAMQQueue.java
Tue Dec  8 04:03:50 2009
@@ -1799,8 +1799,14 @@
     public void setFlowResumeCapacity(long flowResumeCapacity)
     {
         _flowResumeCapacity = flowResumeCapacity;
+        
+        checkCapacity();
     }
 
+    public boolean isOverfull()
+    {
+        return _overfull.get();
+    }
 
     public Set<NotificationCheck> getNotificationChecks()
     {

Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
(original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/MockAMQQueue.java
Tue Dec  8 04:03:50 2009
@@ -426,4 +426,9 @@
     {
         return _name.toString();
     }
+
+    public boolean isOverfull()
+    {
+        return false;
+    }
 }

Modified: qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
(original)
+++ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java
Tue Dec  8 04:03:50 2009
@@ -68,6 +68,9 @@
     String ATTR_MSG_COUNT = "MessageCount";
     String ATTR_QUEUE_DEPTH = "QueueDepth";
     String ATTR_RCVD_MSG_COUNT = "ReceivedMessageCount";
+    String ATTR_CAPACITY = "Capacity";
+    String ATTR_FLOW_OVERFULL = "FlowOverfull";
+    String ATTR_FLOW_RESUME_CAPACITY = "FlowResumeCapacity";
     
     //All attribute names constant
     String[] QUEUE_ATTRIBUTES = new String[]{
@@ -83,7 +86,10 @@
             ATTR_ACTIVE_CONSUMER_COUNT,
             ATTR_MSG_COUNT,
             ATTR_QUEUE_DEPTH,
-            ATTR_RCVD_MSG_COUNT
+            ATTR_RCVD_MSG_COUNT,
+            ATTR_CAPACITY,
+            ATTR_FLOW_OVERFULL,
+            ATTR_FLOW_RESUME_CAPACITY
     };
     
     /**
@@ -230,7 +236,56 @@
      */
     @MBeanAttribute(name="MaximumQueueDepth", description="The threshold high value(Bytes)
for Queue Depth")
     void setMaximumQueueDepth(Long value) throws IOException;
+    
+    
+    /**
+     * Returns the current flow control Capacity of the queue in bytes.
+     * 
+     * @since Qpid JMX API 1.6
+     * @return Capacity at which flow control is enforced
+     * @throws IOException
+     */
+    Long getCapacity() throws IOException;
 
+    /**
+     * Sets the Capacity in bytes above which flow is blocked.
+     * 
+     * @since Qpid JMX API 1.6
+     * @param value the capacity in bytes
+     * @throws IOException
+     * @throws IllegalArgumentException If the given value is less than the queue FloeResumeCapacity
+     */
+    @MBeanAttribute(name="Capacity", description="The flow control Capacity (Bytes) of the
queue")
+    void setCapacity(Long value) throws IOException, IllegalArgumentException;
+    
+    /**
+     * Returns the current flow control FlowResumeCapacity of the queue in bytes.
+     * 
+     * @since Qpid JMX API 1.6
+     * @return Capacity below which flow resumes in bytes
+     * @throws IOException
+     */
+    Long getFlowResumeCapacity() throws IOException;
+
+    /**
+     * Sets the FlowResumeCapacity in bytes below which flow resumes.
+     * 
+     * @since Qpid JMX API 1.6
+     * @param value of the resume capacity in bytes
+     * @throws IOException
+     * @throws IllegalArgumentException If the given value exceeds the queue Capacity
+     */
+    @MBeanAttribute(name="FlowResumeCapacity", description="The flow resume Capacity (Bytes)
of the queue")
+    void setFlowResumeCapacity(Long value) throws IOException, IllegalArgumentException;
+
+    /**
+     * Indicates whether the Queue is currently considered overfull by the FlowControl system
+     * 
+     * @since Qpid JMX API 1.6
+     * @throws IOException
+     */
+    @MBeanAttribute(name="FlowOverfull", description="true if the queue is considered overfull
by the Flow Control system")
+    boolean isFlowOverfull() throws IOException;
 
     //********** Operations *****************//
 

Modified: qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
(original)
+++ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java
Tue Dec  8 04:03:50 2009
@@ -43,7 +43,7 @@
      *  Qpid JMX API 1.1 can be assumed.
      */
     int QPID_JMX_API_MAJOR_VERSION = 1;
-    int QPID_JMX_API_MINOR_VERSION = 5;
+    int QPID_JMX_API_MINOR_VERSION = 6;
     
     
     /**

Modified: qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java?rev=888248&r1=888247&r2=888248&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
(original)
+++ qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ApplicationRegistry.java
Tue Dec  8 04:03:50 2009
@@ -47,7 +47,7 @@
 
     //max supported broker management interface supported by this release of the management
console
     public static final int SUPPORTED_QPID_JMX_API_MAJOR_VERSION = 1;
-    public static final int SUPPORTED_QPID_JMX_API_MINOR_VERSION = 5;
+    public static final int SUPPORTED_QPID_JMX_API_MINOR_VERSION = 6;
     
     public static final String DATA_DIR = System.getProperty("user.home") + File.separator
+ ".qpidmc";
     



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message