diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-08-07 13:14:06 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-08-07 13:14:06 +0000 |
| commit | 400ffb496c30a2a6554af7cf7739db40b497e5c2 (patch) | |
| tree | 153a0795d2cc0f0d32b3dcb630d5f82e1f233b6f /qpid/java/management/common/src/main | |
| parent | 87456620af31532eb5af81c0207e7533ae67fb39 (diff) | |
| download | qpid-python-400ffb496c30a2a6554af7cf7739db40b497e5c2.tar.gz | |
QPID-5970 : [Java Broker] Expose "age of oldest message on queue" to management apis
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1616487 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/management/common/src/main')
2 files changed, 25 insertions, 14 deletions
diff --git a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java index dbce388054..4032cb78df 100644 --- a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java +++ b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ManagedQueue.java @@ -20,14 +20,6 @@ */ package org.apache.qpid.management.common.mbeans; -import org.apache.qpid.management.common.mbeans.annotations.MBeanAttribute; -import org.apache.qpid.management.common.mbeans.annotations.MBeanOperation; -import org.apache.qpid.management.common.mbeans.annotations.MBeanOperationParameter; - -import javax.management.JMException; -import javax.management.MBeanOperationInfo; -import javax.management.openmbean.CompositeData; -import javax.management.openmbean.TabularData; import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -35,6 +27,15 @@ import java.util.Collections; import java.util.HashSet; import java.util.List; +import javax.management.JMException; +import javax.management.MBeanOperationInfo; +import javax.management.openmbean.CompositeData; +import javax.management.openmbean.TabularData; + +import org.apache.qpid.management.common.mbeans.annotations.MBeanAttribute; +import org.apache.qpid.management.common.mbeans.annotations.MBeanOperation; +import org.apache.qpid.management.common.mbeans.annotations.MBeanOperationParameter; + /** * The management interface exposed to allow management of a queue. * @author Robert J. Greig @@ -91,6 +92,7 @@ public interface ManagedQueue static final String ATTR_ALT_EXCHANGE = "AlternateExchange"; static final String ATTR_SHARED_MESSAGE_GROUP = "MessageGroupSharedGroups"; static final String ATTR_MESSAGE_GROUP_KEY = "MessageGroupKey"; + static final String ATTR_OLDEST_MESSAGE_AGE = "OldestMessageAge"; //All attribute names constant static final List<String> QUEUE_ATTRIBUTES @@ -120,7 +122,8 @@ public interface ManagedQueue ATTR_EXCLUSIVE, ATTR_ALT_EXCHANGE, ATTR_SHARED_MESSAGE_GROUP, - ATTR_MESSAGE_GROUP_KEY + ATTR_MESSAGE_GROUP_KEY, + ATTR_OLDEST_MESSAGE_AGE )))); /** @@ -317,7 +320,7 @@ public interface ManagedQueue * * @since Qpid JMX API 1.6 * @return Capacity below which flow resumes in bytes - * @throws IOExceptionm + * @throws IOException */ Long getFlowResumeCapacity() throws IOException; @@ -404,6 +407,13 @@ public interface ManagedQueue @MBeanAttribute(name="MessageGroupSharedGroups", description="If set indicates that while two messages of the same group cannot be processed by different consumers concurrently, no guarantee is made that subsequent messages are always sent to the same consumer") boolean isMessageGroupSharedGroups(); + /** + * Gets the arrival time of the oldest message in the queue + * @since Qpid JMX API 2.8 + */ + @MBeanAttribute(name= ATTR_OLDEST_MESSAGE_AGE, description="the age (in milliseconds since the epoch of the oldest message in the queue (or 0 if the queue is empty)") + Long getOldestMessageAge(); + //********** Operations *****************// diff --git a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java index b1519a27b6..2b51711664 100644 --- a/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java +++ b/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/mbeans/ServerInformation.java @@ -20,11 +20,12 @@ */ package org.apache.qpid.management.common.mbeans; -import org.apache.qpid.management.common.mbeans.annotations.MBeanAttribute; -import org.apache.qpid.management.common.mbeans.annotations.MBeanOperation; +import java.io.IOException; import javax.management.MBeanOperationInfo; -import java.io.IOException; + +import org.apache.qpid.management.common.mbeans.annotations.MBeanAttribute; +import org.apache.qpid.management.common.mbeans.annotations.MBeanOperation; /** * Interface for the ServerInformation MBean @@ -46,7 +47,7 @@ public interface ServerInformation * Qpid JMX API 1.1 can be assumed. */ int QPID_JMX_API_MAJOR_VERSION = 2; - int QPID_JMX_API_MINOR_VERSION = 7; + int QPID_JMX_API_MINOR_VERSION = 8; /** |
