Package io.microraft.exception
Class NotLeaderException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.microraft.exception.RaftException
-
- io.microraft.exception.NotLeaderException
-
- All Implemented Interfaces:
Serializable
public class NotLeaderException extends RaftException
Thrown when an operation, query, or a membership change is triggered on a non-leader Raft node. In this case, the operation can be retried on another Raft node of the Raft group.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NotLeaderException(RaftEndpoint local, RaftEndpoint leader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
-
Methods inherited from class io.microraft.exception.RaftException
getLeader
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
NotLeaderException
public NotLeaderException(RaftEndpoint local, RaftEndpoint leader)
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classRaftException
-
-