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, long configurationIndex)
  • 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
    • configurationIndex

      public long configurationIndex()
      The members current configuration index at the time of handling the append request.

      If the index is 0, this may indicate that the member is older and does not include the configuration index in the response.

      If the index is -1, the member has no configuration and requires a configuration update from the leader.

    • 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