Examples of awaitListenersUninterruptibly()


Examples of net.tomp2p.dht.FuturePut.awaitListenersUninterruptibly()

        // confirm put
        FuturePut futurePutConfirm = peers[rnd.nextInt(10)].put(locationKey).domainKey(domainKey)
            .data(contentKey, new Data()).versionKey(vKey).putConfirm().start();
        futurePutConfirm.awaitUninterruptibly();
        futurePutConfirm.awaitListenersUninterruptibly();

        // get latest version with digest
        FutureGet fget = peers[rnd.nextInt(10)].get(locationKey).domainKey(domainKey)
            .contentKey(contentKey).getLatest().withDigest().start();
        fget.awaitUninterruptibly();
View Full Code Here

Examples of net.tomp2p.futures.FutureDirect.awaitListenersUninterruptibly()

            ccohTCP.reset();
            ccohUDP.reset();

            FutureDirect fd1 = sender.sendDirect(peerConnection).object("test")
                    .connectionTimeoutTCPMillis(2000).idleTCPSeconds(10 * 1000).start();
            fd1.awaitListenersUninterruptibly();
            Assert.assertEquals(true, fd1.isSuccess());
            Assert.assertEquals(1, ccohTCP.total());
            Assert.assertEquals(0, ccohUDP.total());
            Thread.sleep(2000);
            System.err.println("send second with the same connection");
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.