Examples of peerID()


Examples of net.tomp2p.dht.PeerDHT.peerID()

      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(
          new Number640(unreachablePeer.peerID(), Number160.ZERO, Number160.ZERO, Number160.ZERO)));
      System.err.println("DONE!");

    } finally {
      if (master != null) {
        master.shutdown().await();
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

      printMapStatus(unreachablePeer, peers);

      RoutingConfiguration r = new RoutingConfiguration(5, 1, 1);
      RequestP2PConfiguration rp = new RequestP2PConfiguration(1, 1, 0);

      System.err.println("Unreachable: " + unreachablePeer.peerID());
      System.err.println("Relay: " + master.peerID());

      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!
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

      RequestP2PConfiguration rp = new RequestP2PConfiguration(1, 1, 0);

      System.err.println("Unreachable: " + unreachablePeer.peerID());
      System.err.println("Relay: " + master.peerID());

      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());
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

      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)));

      FutureGet futureGet = peers[8].get(unreachablePeer.peerID()).routingConfiguration(r).requestP2PConfiguration(rp)
          .start();
      futureGet.awaitUninterruptibly();
      Assert.assertTrue(futureGet.isSuccess());
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

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

      FutureGet futureGet = peers[8].get(unreachablePeer.peerID()).routingConfiguration(r).requestP2PConfiguration(rp)
          .start();
      futureGet.awaitUninterruptibly();
      Assert.assertTrue(futureGet.isSuccess());

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

Examples of net.tomp2p.dht.PeerDHT.peerID()

      RoutingConfiguration r = new RoutingConfiguration(5, 1, 1);
      RequestP2PConfiguration rp = new RequestP2PConfiguration(1, 1, 0);

      System.err.println(unreachablePeer1.peerID()); // f1
      System.err.println(unreachablePeer2.peerID()); // e7

      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();
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

      RequestP2PConfiguration rp = new RequestP2PConfiguration(1, 1, 0);

      System.err.println(unreachablePeer1.peerID()); // f1
      System.err.println(unreachablePeer2.peerID()); // e7

      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());
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

      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)
          .requestP2PConfiguration(rp).fastGet(false).start().awaitUninterruptibly();
      // TODO: try peers even if no data found with fastget
      System.err.println(futureGet.failedReason());
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

      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)
          .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());
View Full Code Here

Examples of net.tomp2p.dht.PeerDHT.peerID()

            
             RoutingConfiguration r = new RoutingConfiguration(5, 1, 1);
             RequestP2PConfiguration rp = new RequestP2PConfiguration(1, 1, 0);
            
             System.err.println(unreachablePeer1.peerID()); //f1
             System.err.println(unreachablePeer2.peerID()); //e7
            
             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();
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.