Package org.apache.activemq.broker.region

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


        // ensure repeated browse does now blow mem

        final Queue underTest = (Queue) ((RegionBroker)broker.getRegionBroker()).getQueueRegion().getDestinationMap().get(bigQueue);

        // do twice to attempt to pull in 2*maxBrowsePageSize which uses up the system memory limit
        underTest.browse();
        underTest.browse();
        Runtime.getRuntime().gc();
        long free = Runtime.getRuntime().freeMemory()/1024;
        LOG.info("free at start of check: " + free);
        // check for memory growth
View Full Code Here


        final Queue underTest = (Queue) ((RegionBroker)broker.getRegionBroker()).getQueueRegion().getDestinationMap().get(bigQueue);

        // do twice to attempt to pull in 2*maxBrowsePageSize which uses up the system memory limit
        underTest.browse();
        underTest.browse();
        Runtime.getRuntime().gc();
        long free = Runtime.getRuntime().freeMemory()/1024;
        LOG.info("free at start of check: " + free);
        // check for memory growth
        for (int i=0; i<10; i++) {
View Full Code Here

        long free = Runtime.getRuntime().freeMemory()/1024;
        LOG.info("free at start of check: " + free);
        // check for memory growth
        for (int i=0; i<10; i++) {
            LOG.info("free: " + Runtime.getRuntime().freeMemory()/1024);
            underTest.browse();
            Runtime.getRuntime().gc();
            Runtime.getRuntime().gc();
            assertTrue("No growth: " + Runtime.getRuntime().freeMemory()/1024, Runtime.getRuntime().freeMemory()/1024 >= (free - (free * 0.1)));
        }
    }
View Full Code Here

        // ensure repeated browse does now blow mem

        final Queue underTest = (Queue) ((RegionBroker)broker.getRegionBroker()).getQueueRegion().getDestinationMap().get(bigQueue);

        // do twice to attempt to pull in 2*maxBrowsePageSize which uses up the system memory limit
        Message[] browsed = underTest.browse();
        LOG.info("Browsed: " + browsed.length);
        assertEquals("maxBrowsePageSize", maxBrowsePageSize, browsed.length);
        browsed = underTest.browse();
        LOG.info("Browsed: " + browsed.length);
        assertEquals("maxBrowsePageSize", maxBrowsePageSize, browsed.length);
View Full Code Here

        // do twice to attempt to pull in 2*maxBrowsePageSize which uses up the system memory limit
        Message[] browsed = underTest.browse();
        LOG.info("Browsed: " + browsed.length);
        assertEquals("maxBrowsePageSize", maxBrowsePageSize, browsed.length);
        browsed = underTest.browse();
        LOG.info("Browsed: " + browsed.length);
        assertEquals("maxBrowsePageSize", maxBrowsePageSize, browsed.length);
        Runtime.getRuntime().gc();
        long free = Runtime.getRuntime().freeMemory()/1024;
        LOG.info("free at start of check: " + free);
View Full Code Here

        long free = Runtime.getRuntime().freeMemory()/1024;
        LOG.info("free at start of check: " + free);
        // check for memory growth
        for (int i=0; i<10; i++) {
            LOG.info("free: " + Runtime.getRuntime().freeMemory()/1024);
            browsed = underTest.browse();
            LOG.info("Browsed: " + browsed.length);
            assertEquals("maxBrowsePageSize", maxBrowsePageSize, browsed.length);
            Runtime.getRuntime().gc();
            Runtime.getRuntime().gc();
            assertTrue("No growth: " + Runtime.getRuntime().freeMemory()/1024 + " >= " + (free - (free * 0.2)), Runtime.getRuntime().freeMemory()/1024 >= (free - (free * 0.2)));
 
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.