git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1403496 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Timothy A. Bish 2012-10-29 20:50:35 +00:00
parent 8f19af70f4
commit 90eb05c0fb
2 changed files with 49 additions and 36 deletions

View File

@ -22,6 +22,7 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import javax.jms.Connection;
import javax.jms.InvalidSelectorException;
import javax.jms.MessageProducer;
@ -35,6 +36,7 @@ import javax.management.openmbean.OpenDataException;
import javax.management.openmbean.TabularData;
import javax.management.openmbean.TabularDataSupport;
import javax.management.openmbean.TabularType;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.jmx.OpenTypeSupport.OpenTypeFactory;
import org.apache.activemq.broker.region.Destination;
@ -109,6 +111,10 @@ public class DestinationView implements DestinationViewMBean {
return destination.getMemoryUsage().getPercentUsage();
}
public long getMemoryUsageByteCount() {
return destination.getMemoryUsage().getUsage();
}
public long getMemoryLimit() {
return destination.getMemoryUsage().getLimit();
}

View File

@ -19,6 +19,7 @@ package org.apache.activemq.broker.jmx;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.jms.InvalidSelectorException;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
@ -187,6 +188,12 @@ public interface DestinationViewMBean {
@MBeanInfo("The percentage of the memory limit used")
int getMemoryPercentUsage();
/**
* @return the amount of memory currently used by this destination
*/
@MBeanInfo("Memory usage, in bytes, used by undelivered messages")
long getMemoryUsageByteCount();
/**
* @return the amount of memory allocated to this destination
*/