summaryrefslogtreecommitdiff
path: root/java/broker/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'java/broker/src/main')
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java13
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java6
2 files changed, 9 insertions, 10 deletions
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
index 6c44d70847..36da1c4cb1 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/AMQQueueMBean.java
@@ -221,11 +221,12 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que
_queue.setMaximumMessageCount(value);
}
+ /**
+ * returns the maximum total size of messages(bytes) in the queue.
+ */
public Long getMaximumQueueDepth()
{
- long queueDepthInBytes = _queue.getMaximumQueueDepth();
-
- return queueDepthInBytes >> 10;
+ return _queue.getMaximumQueueDepth();
}
public void setMaximumQueueDepth(Long value)
@@ -264,13 +265,11 @@ public class AMQQueueMBean extends AMQManagedObject implements ManagedQueue, Que
}
/**
- * returns the size of messages(KB) in the queue.
+ * returns the total size of messages(bytes) in the queue.
*/
public Long getQueueDepth() throws JMException
{
- long queueBytesSize = _queue.getQueueDepth();
-
- return queueBytesSize >> 10;
+ return _queue.getQueueDepth();
}
/**
diff --git a/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java b/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
index 48fae57134..d2cf90b42d 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/queue/ManagedQueue.java
@@ -41,7 +41,7 @@ import org.apache.qpid.server.management.MBeanOperationParameter;
public interface ManagedQueue
{
static final String TYPE = "Queue";
- static final int VERSION = 1;
+ static final int VERSION = 2;
/**
* Returns the Name of the ManagedQueue.
@@ -72,7 +72,7 @@ public interface ManagedQueue
* @return
* @throws IOException
*/
- @MBeanAttribute(name="QueueDepth", description="Size of messages(KB) in the queue")
+ @MBeanAttribute(name="QueueDepth", description="The total size(Bytes) of messages in the queue")
Long getQueueDepth() throws IOException, JMException;
/**
@@ -181,7 +181,7 @@ public interface ManagedQueue
* @param value
* @throws IOException
*/
- @MBeanAttribute(name="MaximumQueueDepth", description="The threshold high value(KB) for Queue Depth")
+ @MBeanAttribute(name="MaximumQueueDepth", description="The threshold high value(Bytes) for Queue Depth")
void setMaximumQueueDepth(Long value) throws IOException;
//TODO change descriptions