Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureTask.awaitUninterruptibly()


            Utils2.perfectRouting(peers);
            // do testing
            Number160 locationKey = new Number160(rnd);
            FutureTask ft = peers[12].submit(locationKey, new Worker2())
                    .setRequestP2PConfiguration(new RequestP2PConfiguration(1, 0, 0)).start();
            ft.awaitUninterruptibly();
            Assert.assertEquals(true, ft.isSuccess());
            Assert.assertEquals(1, ft.getRawDataMap().size());
        } finally {
            System.out.println("done");
            master.halt();
View Full Code Here


            Utils2.perfectRouting(peers);
            // do testing
            Number160 locationKey = new Number160(rnd);
            FutureTask ft = peers[12].submit(locationKey, new Worker2())
                    .setRequestP2PConfiguration(new RequestP2PConfiguration(2, 0, 0)).start();
            ft.awaitUninterruptibly();
            Assert.assertEquals(true, ft.isSuccess());
            Assert.assertEquals(2, ft.getRawDataMap().size());
        } finally {
            System.out.println("done");
            master.halt();
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.