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
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:
-
Constructor Summary
ConstructorDescriptionNotLeaderException
(RaftEndpoint local, RaftEndpoint leader) Creates an instance of this exception -
Method Summary
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 Details
-
NotLeaderException
Creates an instance of this exception- Parameters:
local
- Raft endpoint of the local Raft nodeleader
- Raft endpoint of the leader known by the local Raft node
-
-
Method Details
-
toString
- Overrides:
toString
in classRaftException
-