Examples of failedReason()


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

Examples of net.tomp2p.dht.FutureGet.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();
             //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

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

    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

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

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

      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

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

      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

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

            
             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

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

        .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

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

    rmvStats.start();
    FutureRemove remove = peerDHT.remove(key.locationKey()).contentKey(key.contentKey()).domainKey(key.domainKey())
        .versionKey(key.versionKey()).routingConfiguration(routingConfig).requestP2PConfiguration(requestConfig)
        .start().awaitUninterruptibly();
    rmvStats.finished(remove.isSuccess());
    LOG.debug("Remove is success {}. Reason: {}", remove.isSuccess(), remove.failedReason());

    return remove.isSuccess();
  }

  private void sleep() {
View Full Code Here

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

    if (bootstrap == null) {
      LOG.error("Cannot bootstrap");
      return false;
    } else if (bootstrap.isFailed()) {
      LOG.error("Cannot bootstrap. Reason: {}", bootstrap.failedReason());
      return false;
    }

    LOG.debug("Peer has bootstrapped");
    return true;
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.