Package org.apache.activemq.broker.jmx

Examples of org.apache.activemq.broker.jmx.QueueViewMBean.purge()


        createProducerAndSendMessages(90000);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        createConsumer();
        long start = System.currentTimeMillis();
        LOG.info("purging..");
        proxy.purge();
        LOG.info("purge done: " + (System.currentTimeMillis() - start) + "ms");
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
        assertEquals("usage goes to duck", 0, proxy.getMemoryPercentUsage());
    }
View Full Code Here


    public void testPurgeLargeQueue() throws Exception {
        applyBrokerSpoolingPolicy();
        createProducerAndSendMessages(NUM_TO_SEND);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        LOG.info("purging..");
        proxy.purge();
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
        assertTrue("cache is disabled, temp store being used", !proxy.isCacheEnabled());
    }
View Full Code Here

        createProducerAndSendMessages(NUM_TO_SEND);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        createConsumer();
        long start = System.currentTimeMillis();
        LOG.info("purging..");
        proxy.purge();
        LOG.info("purge done: " + (System.currentTimeMillis() - start) + "ms");
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
        assertEquals("usage goes to duck", 0, proxy.getMemoryPercentUsage());
        Message msg;
View Full Code Here

    }

    @Override
    public void purgeQueue(ActiveMQDestination destination) throws Exception {
        QueueViewMBean queue = getQueue(destination.getPhysicalName());
        queue.purge();
    }

    @Override
    public ManagementContext getManagementContext() {
        throw new IllegalStateException("not supported");
View Full Code Here

    public void testPurgeLargeQueue() throws Exception {
        applyBrokerSpoolingPolicy();
        createProducerAndSendMessages(NUM_TO_SEND);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        LOG.info("purging..");
        proxy.purge();
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
        assertTrue("cache is disabled, temp store being used", !proxy.isCacheEnabled());
    }
View Full Code Here

        createProducerAndSendMessages(NUM_TO_SEND);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        createConsumer();
        long start = System.currentTimeMillis();
        LOG.info("purging..");
        proxy.purge();
        LOG.info("purge done: " + (System.currentTimeMillis() - start) + "ms");
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
        assertEquals("usage goes to duck", 0, proxy.getMemoryPercentUsage());
    }
View Full Code Here

    return brokers;
  }
 
  public void purgeQueue(ActiveMQDestination destination) throws Exception {
    QueueViewMBean queue = getQueue(destination.getPhysicalName());
    queue.purge();
  }
 
  public ManagementContext getManagementContext() {
    throw new IllegalStateException("not supported");
  }
View Full Code Here

    public void testPurgeQueueWithActiveConsumer() throws Exception {
        createProducerAndSendMessages();
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        createConsumer();
        proxy.purge();
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
    }

    private QueueViewMBean getProxyToQueueViewMBean()
View Full Code Here

    public void testPurgeQueueWithActiveConsumer() throws Exception {
        createProducerAndSendMessages(10000);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        createConsumer();
        proxy.purge();
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
    }
   
   
View Full Code Here

    public void testPurgeLargeQueue() throws Exception {      
        applyBrokerSpoolingPolicy();
        createProducerAndSendMessages(90000);
        QueueViewMBean proxy = getProxyToQueueViewMBean();
        LOG.info("purging..");
        proxy.purge();
        assertEquals("Queue size is not zero, it's " + proxy.getQueueSize(), 0,
                proxy.getQueueSize());
    }

    public void testRepeatedExpiryProcessingOfLargeQueue() throws Exception {      
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.