Class RaftError

java.lang.Object
io.atomix.raft.RaftError

public class RaftError extends Object
Base type for Raft protocol errors.

Raft errors are passed on the wire in lieu of exceptions to reduce the overhead of serialization. Each error is identifiable by an error ID which is used to serialize and deserialize errors.

  • Constructor Details

  • Method Details

    • type

      public RaftError.Type type()
      Returns the error type.
      Returns:
      The error type.
    • message

      public String message()
      Returns the error message.
      Returns:
      The error message.
    • createException

      public PrimitiveException createException()
      Creates a new exception for the error.
      Returns:
      The error exception.
    • toString

      public String toString()
      Overrides:
      toString in class Object