Package net.tomp2p.dht

Examples of net.tomp2p.dht.FutureSend


    }
  }

  private static void exampleSendOne(PeerDHT peer) {
    RequestP2PConfiguration requestP2PConfiguration = new RequestP2PConfiguration(1, 10, 0);
    FutureSend futureSend = peer.send(Number160.createHash("key")).object("hello")
            .requestP2PConfiguration(requestP2PConfiguration).start();
    futureSend.awaitUninterruptibly();
    for (Object object : futureSend.rawDirectData2().values()) {
      System.err.println("got:" + object);
    }
  }
View Full Code Here


      System.err.println("got:" + object);
    }
  }

  private static void exampleSendRedundant(PeerDHT peer) {
    FutureSend futureSend = peer.send(Number160.createHash("key")).object("hello").start();
    futureSend.awaitUninterruptibly();
    for (Object object : futureSend.rawDirectData2().values()) {
      System.err.println("got:" + object);
    }

  }
View Full Code Here

TOP

Related Classes of net.tomp2p.dht.FutureSend

Copyright © 2018 www.massapicom. 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.