Class AppendResponse

java.lang.Object
io.atomix.raft.protocol.AbstractRaftResponse
io.atomix.raft.protocol.AppendResponse
All Implemented Interfaces:
RaftMessage, RaftResponse

public class AppendResponse extends AbstractRaftResponse
Server append entries response.
  • Constructor Details

    • AppendResponse

      public AppendResponse(RaftResponse.Status status, RaftError error, long term, boolean succeeded, long lastLogIndex, long lastSnapshotIndex)
  • Method Details

    • builder

      public static AppendResponse.Builder builder()
      Returns a new append response builder.
      Returns:
      A new append response builder.
    • term

      public long term()
      Returns the requesting node's current term.
      Returns:
      The requesting node's current term.
    • succeeded

      public boolean succeeded()
      Returns a boolean indicating whether the append was successful.
      Returns:
      Indicates whether the append was successful.
    • lastLogIndex

      public long lastLogIndex()
      Returns the last index of the replica's log.
      Returns:
      The last index of the responding replica's log.
    • lastSnapshotIndex

      public long lastSnapshotIndex()
      Returns the index of the replica's last snapshot
      Returns:
      The index of the responding replica's last snapshot
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class AbstractRaftResponse
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class AbstractRaftResponse
    • toString

      public String toString()
      Overrides:
      toString in class AbstractRaftResponse