Package org.apache.activemq.broker.region

Examples of org.apache.activemq.broker.region.Queue.purge()


    public void purgeQueue(ActiveMQDestination destination) throws Exception {
        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
        for (Iterator i = destinations.iterator(); i.hasNext();) {
            Queue regionQueue = (Queue)i.next();
            regionQueue.purge();
        }
    }
}
View Full Code Here


        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
        for (Iterator i = destinations.iterator(); i.hasNext();) {
            Destination dest = (Destination) i.next();
            if (dest instanceof Queue) {
                Queue regionQueue = (Queue) dest;
                regionQueue.purge();
            }
        }
    }

    @Override
View Full Code Here

        assertTrue("all messages were received", Wait.waitFor(new Wait.Condition(){
            public boolean isSatisified() throws Exception {
                return data.length == dest.getDestinationStatistics().getMessages().getCount();
            }}));
       
        dest.purge();
        assertEquals(0, dest.getDestinationStatistics().getMessages().getCount());
    }
}
View Full Code Here

    public void purgeQueue(ActiveMQDestination destination) throws Exception {
        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
        for (Iterator i = destinations.iterator(); i.hasNext();) {
            Queue regionQueue = (Queue)i.next();
            regionQueue.purge();
        }
    }
}
View Full Code Here

        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
        for (Iterator i = destinations.iterator(); i.hasNext();) {
            Destination dest = (Destination) i.next();
            if (dest instanceof Queue) {
                Queue regionQueue = (Queue) dest;
                regionQueue.purge();
            }
        }
    }

    @Override
View Full Code Here

        assertTrue("all messages were received", Wait.waitFor(new Wait.Condition(){
            public boolean isSatisified() throws Exception {
                return data.length == dest.getDestinationStatistics().getMessages().getCount();
            }}));
       
        dest.purge();
        assertEquals(0, dest.getDestinationStatistics().getMessages().getCount());
    }
}
View Full Code Here

        }
    }

    private static void purgeDestination(String destination) throws Exception {
        final Queue dest = (Queue) ((RegionBroker) broker.getRegionBroker()).getQueueRegion().getDestinationMap().get(new ActiveMQQueue(destination));
        dest.purge();
        assertEquals(0, dest.getDestinationStatistics().getMessages().getCount());
    }
}
View Full Code Here

        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
        for (Iterator i = destinations.iterator(); i.hasNext();) {
            Destination dest = (Destination) i.next();
            if (dest instanceof Queue) {
                Queue regionQueue = (Queue) dest;
                regionQueue.purge();
            }
        }
    }
   
}
View Full Code Here

        Set destinations = getManagedBroker().getQueueRegion().getDestinations(destination);
        for (Iterator i = destinations.iterator(); i.hasNext();) {
            Destination dest = (Destination) i.next();
            if (dest instanceof Queue) {
                Queue regionQueue = (Queue) dest;
                regionQueue.purge();
            }
        }
    }

    @Override
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.