Package net.tomp2p.replication

Examples of net.tomp2p.replication.DirectReplication.start()


     * @throws IOException .
     */
    private static void exmpleDirectReplication(final PeerDHT[] peers) throws IOException, InterruptedException {
        PutBuilder putBuilder = peers[1].put(Number160.ONE).data(new Data("test"));
        DirectReplication replication = new DirectReplication(peers[1].peer());
        Shutdown shutdown = replication.start(putBuilder, 1000, -1, new AutomaticFuture() {
      @Override
      public void futureCreated(BaseFuture future) {
        System.out.println("put again...");
      }
    });
View Full Code Here


    });
        Thread.sleep(NINE_SECONDS);
        System.out.println("stop replication");
        shutdown.shutdown();
        RemoveBuilder removeBuilder = peers[1].remove(Number160.ONE);
        replication.start(removeBuilder, 1000, 9, new AutomaticFuture() {
      @Override
      public void futureCreated(BaseFuture future) {
        System.out.println("remove again...");
      }
    });
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.