Package net.tomp2p.dht

Examples of net.tomp2p.dht.FutureGet.failedReason()


          new Number640(unreachablePeer2.peerID(), Number160.ZERO, Number160.ZERO, Number160.ZERO)));

      FutureGet futureGet = unreachablePeer1.get(unreachablePeer2.peerID()).routingConfiguration(r)
          .requestP2PConfiguration(rp).fastGet(false).start().awaitUninterruptibly();
      // TODO: try peers even if no data found with fastget
      System.err.println(futureGet.failedReason());
      Assert.assertTrue(futureGet.isSuccess());

      // we cannot see the peer in futurePut.rawResult, as the relayed is the slowest and we finish
      // earlier than that.
View Full Code Here


             Assert.assertTrue(futurePut.isSuccess());
             Assert.assertTrue(unreachablePeer2.storageLayer().contains(new Number640(unreachablePeer2.peerID(), Number160.ZERO, Number160.ZERO, Number160.ZERO)));
            
             FutureGet futureGet = unreachablePeer1.get(unreachablePeer2.peerID()).routingConfiguration(r).sign().requestP2PConfiguration(rp).fastGet(false).start().awaitUninterruptibly();
             //TODO: try peers even if no data found with fastget
             System.err.println(futureGet.failedReason());
             Assert.assertTrue(futureGet.isSuccess());
            
             //we cannot see the peer in futurePut.rawResult, as the relayed is the slowest and we finish earlier than that.
            
             System.err.println("DONE!");
View Full Code Here

    getStats.start();
    FutureGet futureGet = peerDHT.get(key.locationKey()).contentKey(key.contentKey()).domainKey(key.domainKey())
        .versionKey(key.versionKey()).routingConfiguration(routingConfig).requestP2PConfiguration(requestConfig)
        .start().awaitUninterruptibly();
    getStats.finished(futureGet.isSuccess());
    LOG.debug("Get is success {}. Reason: {}", futureGet.isSuccess(), futureGet.failedReason());

    if (futureGet.data() != null) {
      return futureGet.data();
    } else {
      return null;
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.