From 10872a53c9eb37db30b5d048910997c96bf0abad Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Fri, 12 Apr 2019 15:22:33 +0400 Subject: [PATCH] Added autoreplication --- src/main/java/io/github/chronosx88/dhtBootstrap/Main.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/io/github/chronosx88/dhtBootstrap/Main.java b/src/main/java/io/github/chronosx88/dhtBootstrap/Main.java index e75732f..54e6ea4 100644 --- a/src/main/java/io/github/chronosx88/dhtBootstrap/Main.java +++ b/src/main/java/io/github/chronosx88/dhtBootstrap/Main.java @@ -8,6 +8,7 @@ import net.tomp2p.p2p.PeerBuilder; import net.tomp2p.peers.Number160; import net.tomp2p.relay.RelayType; import net.tomp2p.relay.tcp.TCPRelayServerConfig; +import net.tomp2p.replication.AutoReplication; import net.tomp2p.storage.StorageDisk; import java.io.*; @@ -58,6 +59,7 @@ public class Main { new PeerBuilderNAT(peerDHT.peer()) .addRelayServerConfiguration(RelayType.OPENTCP, new TCPRelayServerConfig()) .start(); + new AutoReplication(peerDHT.peer()).start(); } catch (IOException e) { e.printStackTrace(); }