Package net.tomp2p.dht

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


     * @param nr The number where the data is stored
     */
    private static void exampleGetNonBlocking(final PeerDHT[] peers, final Number160 nr) {
        FutureGet futureGet = peers[PEER_NR_2].get(nr).start();
        // non-blocking operation
        futureGet.addListener(new BaseFutureAdapter<FutureGet>() {
          @Override
      public void operationComplete(FutureGet future) throws Exception {
            System.out.println("result non-blocking: " + future.data().object());
            }
           
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.