Interface RaftResponse

All Superinterfaces:
RaftMessage
All Known Implementing Classes:
AbstractRaftResponse, AppendResponse, ConfigurationResponse, ConfigureResponse, ForceConfigureResponse, InstallResponse, JoinResponse, LeaveResponse, PollResponse, ReconfigureResponse, TransferResponse, VoteResponse

public interface RaftResponse extends RaftMessage
Base interface for responses.

Each response has a non-null RaftResponse.Status of either RaftResponse.Status.OK or RaftResponse.Status.ERROR. Responses where status() is RaftResponse.Status.ERROR may provide an optional error() code.

  • Method Details

    • status

      Returns the response status.
      Returns:
      The response status.
    • error

      RaftError error()
      Returns the response error if the response status is Status.ERROR
      Returns:
      The response error.