Package org.openstreetmap.osmosis.replication.common

Examples of org.openstreetmap.osmosis.replication.common.ReplicationSequenceFormatter


    for (int i = 0; i < sequenceCount; i++) {
      source.sendSequence();
    }

    // Wait for all the data to reach the destination.
    File finalStateFile = new File(workingDir2, new ReplicationSequenceFormatter(9, 3).getFormattedName(
        sequenceCount, ".state.txt"));
    timerStart = System.currentTimeMillis();
    while (!finalStateFile.exists() && (System.currentTimeMillis() - timerStart < 10000)) {
      Thread.sleep(100);
    }
View Full Code Here


  public ReplicationDataServerHandler(SequenceServerControl control, File dataDirectory) {
    super(control);

    this.dataDirectory = dataDirectory;

    sequenceFormatter = new ReplicationSequenceFormatter(9, 3);
  }
View Full Code Here

   *            The directory containing configuration and tracking files.
   */
  public BaseReplicationDownloader(File workingDirectory) {
    this.workingDirectory = workingDirectory;
   
    sequenceFormatter = new ReplicationSequenceFormatter(9, 3);
    serverStateReader = new ServerStateReader();
  }
View Full Code Here

    final int groupingLength = 0;
    final long sequenceNumber = 100;
    String formattedSequenceNumber;
   
    formattedSequenceNumber =
      new ReplicationSequenceFormatter(minimumLength, groupingLength).getFormattedName(sequenceNumber, ".osc.gz");
    Assert.assertEquals("The formatted sequence number is incorrect.", "100.osc.gz", formattedSequenceNumber);
  }
View Full Code Here

    final int groupingLength = 0;
    final long sequenceNumber = 100;
    String formattedSequenceNumber;
   
    formattedSequenceNumber =
      new ReplicationSequenceFormatter(minimumLength, groupingLength).getFormattedName(sequenceNumber, ".osc.gz");
    Assert.assertEquals("The formatted sequence number is incorrect.", "000000100.osc.gz", formattedSequenceNumber);
  }
View Full Code Here

    final int groupingLength = 3;
    final long sequenceNumber = 1000;
    String formattedSequenceNumber;
   
    formattedSequenceNumber =
      new ReplicationSequenceFormatter(minimumLength, groupingLength).getFormattedName(sequenceNumber, ".osc.gz");
    Assert.assertEquals("The formatted sequence number is incorrect.", "1/000.osc.gz", formattedSequenceNumber);
  }
View Full Code Here

    final int groupingLength = 3;
    final long sequenceNumber = 100;
    String formattedSequenceNumber;
   
    formattedSequenceNumber =
      new ReplicationSequenceFormatter(minimumLength, groupingLength).getFormattedName(sequenceNumber, ".osc.gz");
    Assert.assertEquals("The formatted sequence number is incorrect.", "000/000/100.osc.gz",
        formattedSequenceNumber);
  }
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.replication.common.ReplicationSequenceFormatter

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.