Package com.googlecode.flaxcrawler.concurrent

Examples of com.googlecode.flaxcrawler.concurrent.BerkleyQueue


    }

    @Test
    @Ignore
    public void testBerkleyQueue() {
        BerkleyQueue queue = new BerkleyQueue("stats");
        try {
            queue.setQueueCapacity(500);

            for (int i = 0; i < 1000; i++) {
                queue.add(new TestTask("tratatatat"));
            }

            for (int i = 0; i < 1000; i++) {
                Object obj = queue.poll();
                assertNotNull(obj);
            }

            assertNull(queue.poll());
        } finally {
            queue.dispose();
        }
    }
View Full Code Here

TOP

Related Classes of com.googlecode.flaxcrawler.concurrent.BerkleyQueue

Copyright © 2018 www.massapicom. 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.