Package net.kuujo.copycat.protocol

Examples of net.kuujo.copycat.protocol.SyncRequest


   * Sends a sync request.
   */
  private void doSync(final long prevIndex, final CopycatEntry prevEntry, final List<CopycatEntry> entries) {
    final long commitIndex = state.commitIndex();

    SyncRequest request = new SyncRequest(state.nextCorrelationId(), state.currentTerm(), state.clusterManager().localNode().member().id(), prevIndex, prevEntry != null ? prevEntry.term() : 0, entries, commitIndex);

    sendIndex = Math.max(sendIndex + 1, prevIndex + entries.size() + 1);

    LOGGER.debug("{} - Sent {} to {}", state.clusterManager().localNode(), request, node);
    node.client().sync(request).whenComplete((response, error) -> {
View Full Code Here

TOP

Related Classes of net.kuujo.copycat.protocol.SyncRequest

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.