mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@812790 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6fc3744c73
commit
390bb147ef
|
@ -25,6 +25,7 @@ import org.apache.activemq.broker.jmx.BrokerView;
|
||||||
import org.apache.activemq.broker.jmx.BrokerViewMBean;
|
import org.apache.activemq.broker.jmx.BrokerViewMBean;
|
||||||
import org.apache.activemq.broker.jmx.ManagedRegionBroker;
|
import org.apache.activemq.broker.jmx.ManagedRegionBroker;
|
||||||
import org.apache.activemq.broker.jmx.ManagementContext;
|
import org.apache.activemq.broker.jmx.ManagementContext;
|
||||||
|
import org.apache.activemq.broker.region.Destination;
|
||||||
import org.apache.activemq.broker.region.Queue;
|
import org.apache.activemq.broker.region.Queue;
|
||||||
import org.apache.activemq.command.ActiveMQDestination;
|
import org.apache.activemq.command.ActiveMQDestination;
|
||||||
|
|
||||||
|
@ -66,9 +67,12 @@ public class LocalBrokerFacade extends BrokerFacadeSupport {
|
||||||
public void purgeQueue(ActiveMQDestination destination) throws Exception {
|
public void purgeQueue(ActiveMQDestination destination) throws Exception {
|
||||||
Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
|
Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
|
||||||
for (Iterator i = destinations.iterator(); i.hasNext();) {
|
for (Iterator i = destinations.iterator(); i.hasNext();) {
|
||||||
Queue regionQueue = (Queue)i.next();
|
Destination dest = (Destination) i.next();
|
||||||
|
if (dest instanceof Queue) {
|
||||||
|
Queue regionQueue = (Queue) dest;
|
||||||
regionQueue.purge();
|
regionQueue.purge();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue