Package net.tomp2p.dht

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


      FuturePut futurePut = peers[8].put(unreachablePeer.peerID()).data(new Data("hello")).start()
          .awaitUninterruptibly();
      // the relayed one is the slowest, so we need to wait for it!
      futurePut.futureRequests().awaitUninterruptibly();
      System.err.println(futurePut.failedReason());

      Assert.assertTrue(futurePut.isSuccess());
      // we cannot see the peer in futurePut.rawResult, as the relayed is the slowest and we finish
      // earlier than that.
      Assert.assertTrue(unreachablePeer.storageLayer().contains(
View Full Code Here


      FuturePut futurePut = peers[8].put(unreachablePeer.peerID()).data(new Data("hello")).routingConfiguration(r)
          .requestP2PConfiguration(rp).start().awaitUninterruptibly();
      // the relayed one is the slowest, so we need to wait for it!
      futurePut.futureRequests().awaitUninterruptibly();
      System.err.println(futurePut.failedReason());

      Assert.assertTrue(futurePut.isSuccess());
      Assert.assertTrue(unreachablePeer.storageLayer().contains(
          new Number640(unreachablePeer.peerID(), Number160.ZERO, Number160.ZERO, Number160.ZERO)));
View Full Code Here

      FuturePut futurePut = unreachablePeer1.put(unreachablePeer2.peerID()).data(new Data("hello"))
          .routingConfiguration(r).requestP2PConfiguration(rp).start().awaitUninterruptibly();
      // the relayed one is the slowest, so we need to wait for it!
      futurePut.futureRequests().awaitUninterruptibly();
      System.err.println(futurePut.failedReason());

      Assert.assertTrue(futurePut.isSuccess());
      Assert.assertTrue(unreachablePeer2.storageLayer().contains(
          new Number640(unreachablePeer2.peerID(), Number160.ZERO, Number160.ZERO, Number160.ZERO)));
View Full Code Here

            
             FuturePut futurePut = unreachablePeer1.put(unreachablePeer2.peerID()).data(new Data("hello")).sign().routingConfiguration(r).requestP2PConfiguration(rp).start().awaitUninterruptibly();
             //the relayed one is the slowest, so we need to wait for it!
             futurePut.awaitUninterruptibly();
             futurePut.futureRequests().awaitUninterruptibly();
             System.err.println(futurePut.failedReason());
            
             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();
View Full Code Here

        .data(key.contentKey(), data).routingConfiguration(routingConfig).requestP2PConfiguration(requestConfig)
        .start().awaitUninterruptibly();
    putStats.finished(futurePut.isSuccess());
   
    LOG.debug("Put of {} bytes is success = {}. Reason: {}", data.length(), futurePut.isSuccess(),
        futurePut.failedReason());
    return futurePut.isSuccess();
  }

  private void get(Number160 key) {
    Data data = get(new Number640(key, Number160.ZERO, Number160.ZERO, Number160.ZERO));
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.