Examples of failedReason()


Examples of net.tomp2p.futures.FutureDiscover.failedReason()

    System.out.println("About to wait...");
    fd.awaitUninterruptibly();
    if (fd.isSuccess()) {
      System.out.println("*** FOUND THAT MY OUTSIDE ADDRESS IS " + fd.peerAddress());
    } else {
      System.out.println("*** FAILED " + fd.failedReason());
    }

    bootStrapServer = fd.reporter();
    FutureBootstrap bootstrap = peer.peer().bootstrap().peerAddress(bootStrapServer).start();
    bootstrap.awaitUninterruptibly();
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            addBuilder.versionKey(Number160.ZERO);
            // addBuilder.setList();
            // addBuilder.random(new Random(42));
            FutureResponse fr = smmSender.add(recv1.peerAddress(), addBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());
            // add a the same data twice
            fr = smmSender.add(recv1.peerAddress(), addBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());
            // add a the same data twice
            fr = smmSender.add(recv1.peerAddress(), addBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());

            Number320 key = new Number320(new Number160(33), Number160.createHash("test"));
            // Set<Number480> tofetch = new HashSet<Number480>();
            Number640 from = new Number640(key, Number160.ZERO, Number160.ZERO);
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            addBuilder.list();
            addBuilder.random(new Random(42));

            fr = smmSender.add(recv1.peerAddress(), addBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());

            key = new Number320(new Number160(33), Number160.createHash("test"));
            // Set<Number480> tofetch = new HashSet<Number480>();
            from = new Number640(key, Number160.ZERO, Number160.ZERO);
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            putBuilder.dataMapContent(tmp);
            putBuilder.versionKey(Number160.ZERO);

            FutureResponse fr = smmSender.put(recv1.peerAddress(), putBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());

            Number640 key1 = new Number640(new Number160(33), Number160.createHash("test"), new Number160(77), Number160.ZERO);
            Data c = storeRecv.get(key1);
           
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            tmp.put(new Number160(77), test);
            tmp.put(new Number160(88), test2);
            putBuilder.dataMapContent(tmp);
            fr = smmSender.put(recv1.peerAddress(), putBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());
            Map<Number640, Data> result2 = storeRecv.subMap(key1.minContentKey(), key1.maxContentKey(), -1, true);
            Assert.assertEquals(result2.size(), 2);
            //Number480 search = new Number480(key, new Number160(88));
            Number640 key2 = new Number640(new Number160(33), Number160.createHash("test"), new Number160(88), Number160.ZERO);
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            getBuilder.versionKey(Number160.ZERO);

            fr = smmSender.get(recv1.peerAddress(), getBuilder, cc);
            fr.awaitUninterruptibly();
            Assert.assertEquals(true, fr.isSuccess());
            System.err.println(fr.failedReason());
            Message m = fr.responseMessage();
            Map<Number640, Data> stored = m.dataMap(0).dataMap();
            compare(dataMap.convertToMap640(), stored);
            System.err.println("done!");
        } finally {
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

                }
                // cc1.release();
                for (FutureResponse fr : res) {
                    fr.awaitUninterruptibly();
                    if (!fr.isSuccess()) {
                        System.err.println("failed: " + fr.failedReason());
                    }
                    Assert.assertEquals(true, fr.isSuccess());
                }
                res.clear();
                cc.shutdown().awaitListenersUninterruptibly();
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            getBuilder.versionKey(Number160.ZERO);

            fr = smmSender.get(recv1.peerAddress(), getBuilder, cc);

            fr.awaitUninterruptibly();
            System.err.println(fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());
            Number640 key = new Number640(new Number160(33), Number160.createHash("test"), new Number160(77), Number160.ZERO);
            Assert.assertEquals(50 * 1024 * 1024, fr.responseMessage().dataMap(0).dataMap().get(key)
                    .length());
        } finally {
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.failedReason()

            putBuilder.idleTCPSeconds(Integer.MAX_VALUE);
            putBuilder.versionKey(Number160.ZERO);

            FutureResponse fr = smmSender.put(recv1.peerAddress(), putBuilder, cc);
            fr.awaitUninterruptibly();
            System.err.println("XX:" + fr.failedReason());
            Assert.assertEquals(true, fr.isSuccess());
            //
            GetBuilder getBuilder = new GetBuilder(recv1, new Number160(33));
            getBuilder.domainKey(Number160.createHash("test"));
            fr = smmSender.get(recv1.peerAddress(), getBuilder, cc);
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.