Examples of peerAddress()


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

        FutureDigest futureDigest = peer1.digest(new Number160(nr3)).start();
        futureDigest.awaitUninterruptibly();
        System.out.println("we found the data on " + futureDigest.rawDigest().size() + " peers");
        // now peer1 gets to know peer2, transfer the data
        peer1.peer().bootstrap().peerAddress(peer2.peerAddress()).start();
        peer1.peer().bootstrap().peerAddress(peer3.peerAddress()).start();
        Thread.sleep(ONE_SECOND);
        futureDigest = peer1.digest(new Number160(nr3)).start();
        futureDigest.awaitUninterruptibly();
        System.out.println("we found the data on " + futureDigest.rawDigest().size() + " peers");
        shutdown(peers);
View Full Code Here

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

      map.put(new Number640(locationKey, domainKey, contentKey, Number160.ZERO), new Data("Test"));

      sender.put(locationKey).data(new Data(value)).start().awaitUninterruptibly();
      receiver.put(locationKey).data(new Data(value)).start().awaitUninterruptibly();

      sender.peer().bootstrap().peerAddress(receiver.peerAddress()).start().awaitUninterruptibly();

      FutureChannelCreator futureChannelCreator = sender.peer().connectionBean().reservation().create(0, 1);

      final CountDownLatch latch = new CountDownLatch(1);
      final PeerAddress receiverAddress = receiver.peerAddress();
View Full Code Here

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

      sender.peer().bootstrap().peerAddress(receiver.peerAddress()).start().awaitUninterruptibly();

      FutureChannelCreator futureChannelCreator = sender.peer().connectionBean().reservation().create(0, 1);

      final CountDownLatch latch = new CountDownLatch(1);
      final PeerAddress receiverAddress = receiver.peerAddress();

      futureChannelCreator.addListener(new BaseFutureAdapter<FutureChannelCreator>() {
        @Override
        public void operationComplete(final FutureChannelCreator future2) throws Exception {
          if (future2.isSuccess()) {
View Full Code Here

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

      final DataMap dataMap = new DataMap(map);
      map.put(new Number640(locationKey, domainKey, contentKey, Number160.ZERO), new Data("Test"));

      sender.put(locationKey).data(new Data(value)).start().awaitUninterruptibly();

      sender.peer().bootstrap().peerAddress(receiver.peerAddress()).start().awaitUninterruptibly();
      final CountDownLatch latch = new CountDownLatch(1);
      final PeerAddress receiverAddress = receiver.peerAddress();
      FutureChannelCreator futureChannelCreator = sender.peer().connectionBean().reservation().create(0, 1);
      futureChannelCreator.addListener(new BaseFutureAdapter<FutureChannelCreator>() {
        @Override
View Full Code Here

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

      sender.put(locationKey).data(new Data(value)).start().awaitUninterruptibly();

      sender.peer().bootstrap().peerAddress(receiver.peerAddress()).start().awaitUninterruptibly();
      final CountDownLatch latch = new CountDownLatch(1);
      final PeerAddress receiverAddress = receiver.peerAddress();
      FutureChannelCreator futureChannelCreator = sender.peer().connectionBean().reservation().create(0, 1);
      futureChannelCreator.addListener(new BaseFutureAdapter<FutureChannelCreator>() {
        @Override
        public void operationComplete(final FutureChannelCreator future2) throws Exception {
          if (future2.isSuccess()) {
View Full Code Here

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

      HashMap<Number640, Data> map = new HashMap<Number640, Data>();
      final DataMap dataMap = new DataMap(map);
      map.put(new Number640(locationKey, domainKey, contentKey, Number160.ZERO), new Data("Test"));

      sender.peer().bootstrap().peerAddress(receiver.peerAddress()).start().awaitUninterruptibly();

      final CountDownLatch latch = new CountDownLatch(1);
      final PeerAddress receiverAddress = receiver.peerAddress();

      FutureChannelCreator futureChannelCreator = sender.peer().connectionBean().reservation().create(0, 1);
View Full Code Here

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

      map.put(new Number640(locationKey, domainKey, contentKey, Number160.ZERO), new Data("Test"));

      sender.peer().bootstrap().peerAddress(receiver.peerAddress()).start().awaitUninterruptibly();

      final CountDownLatch latch = new CountDownLatch(1);
      final PeerAddress receiverAddress = receiver.peerAddress();

      FutureChannelCreator futureChannelCreator = sender.peer().connectionBean().reservation().create(0, 1);
      futureChannelCreator.addListener(new BaseFutureAdapter<FutureChannelCreator>() {
        @Override
        public void operationComplete(final FutureChannelCreator future2) throws Exception {
View Full Code Here

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

      Data test2 = new Data(oldValue.getBytes());

      sender.put(locationKey).data(test1).start().awaitUninterruptibly();
      receiver.put(locationKey).data(test2).start().awaitUninterruptibly();

      FutureDone<SyncStat> future = senderSync.synchronize(receiver.peerAddress()).key(key)
              .start();
      future.awaitUninterruptibly();

      System.err.println(future.object().toString());
      Data data = receiver.storageLayer()
View Full Code Here

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

      Data test2 = new Data(oldValue.getBytes());

      sender.put(locationKey).data(test1).start().awaitUninterruptibly();
      receiver.put(locationKey).data(test2).start().awaitUninterruptibly();

      FutureDone<SyncStat> future = senderSync.synchronize(receiver.peerAddress()).key(key)
              .start();
      future.awaitUninterruptibly();

      System.err.println(future.object().toString());
      Data data = receiver.storageLayer()
View Full Code Here

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

      Data test2 = new Data(oldValue.getBytes());

      sender.put(locationKey).data(test1).start().awaitUninterruptibly();
      receiver.put(locationKey).data(test2).start().awaitUninterruptibly();

      FutureDone<SyncStat> future = senderSync.synchronize(receiver.peerAddress()).key(key)
              .start();
      future.awaitUninterruptibly();

      System.err.println(future.object().toString());
      Data data = receiver.storageLayer()
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.