예제 #1
0
  @Override
  public void run() {
    try {
      // we get called every x seconds for content we are responsible for. So
      // we need to make sure that there are enough copies. The easy way is to
      // publish it again... The good way is to do a diff
      Collection<Number160> locationKeys =
          peer.storageLayer().findContentForResponsiblePeerID(peer.peerID());

      for (Number160 locationKey : locationKeys) {
        synchronizeData(locationKey);
      }
      // recalculate replication factor
      int replicationFactor = IndirectReplication.this.replicationFactor.replicationFactor();
      replication.replicationFactor(replicationFactor);
    } catch (Throwable t) {
      t.printStackTrace();
    }
  }
예제 #2
0
 @Override
 public String toString() {
   return "Query-Peer " + peerDHT.peerID();
 }