Examples of SequenceClientRestartManager


Examples of org.openstreetmap.osmosis.replicationhttp.v0_6.impl.SequenceClientRestartManager

    };

    // Create a sequence client restart manager so that our sequence
    // client continues processing in the face of temporary connectivity
    // issues.
    SequenceClientRestartManager clientRestartManager = new SequenceClientRestartManager();

    // Create the client for receiving updated sequence numbers..
    SequenceNumberClientChannelPipelineFactory channelPipelineFactory =
        new SequenceNumberClientChannelPipelineFactory(
            clientRestartManager.getControl(), numberListener, "localhost");
    SequenceClient client = new SequenceClient(new InetSocketAddress(notificationPort), channelPipelineFactory);

    try {
      // Start the server with the current replication number.
      server.start(getCurrentSequenceNumber());

      // Update the port. It may have been allocated dynamically if the
      // port was specified as 0.
      port = server.getPort();

      // Run the client and perform restarts if it fails. This call will
      // block.
      clientRestartManager.manageClient(client);

    } finally {
      server.stop();
    }
  }
View Full Code Here

Examples of org.openstreetmap.osmosis.replicationhttp.v0_6.impl.SequenceClientRestartManager

  public void run() {
    try {
      // Create a sequence client restart manager so that our sequence
      // client continues processing in the face of temporary connectivity
      // issues.
      SequenceClientRestartManager clientRestartManager = new SequenceClientRestartManager();
     
      // Create the client for receiving replication data.
      ReplicationDataClientChannelPipelineFactory pipelineFactory =
          new ReplicationDataClientChannelPipelineFactory(
              clientRestartManager.getControl(), changeSinkWrapper, serverAddress.getHostName(),
              pathPrefix);
      SequenceClient client = new SequenceClient(serverAddress, pipelineFactory);

      // Run the client and perform restarts if it fails. This call will
      // block.
      clientRestartManager.manageClient(client);

    } finally {
      changeSinkWrapper.realRelease();
    }
  }
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.