Examples of SleepingCallable


Examples of org.apache.felix.ipojo.extender.internal.queue.callable.SleepingCallable

        assertEquals(0, queueService.getWaiters());
        assertEquals(0, queueService.getCurrents());
        assertEquals(0, queueService.getFinished());

        // We create 4 job, so that we have the 2 first executed while the 2 others are waiting
        Future<String> one = queueService.submit(new SleepingCallable(50, "1"), m_callback, "First");
        Future<String> two = queueService.submit(new SleepingCallable(50, "2"), m_callback, "Second");
        Future<String> three = queueService.submit(new SleepingCallable(50, "3"), m_callback, "Third");
        Future<String> four = queueService.submit(new SleepingCallable(50, "4"), m_callback, "Fourth");

        // Wait for callable to finish
        one.get();
        two.get();
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.