Package io.microraft.exception
Class RaftException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.microraft.exception.RaftException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CannotReplicateException
,IndeterminateStateException
,LaggingCommitIndexException
,MismatchingRaftGroupMembersCommitIndexException
,NotLeaderException
public class RaftException extends RuntimeException
Base exception class for Raft-related exceptions.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RaftException(RaftEndpoint leader)
RaftException(String message, RaftEndpoint leader)
RaftException(String message, RaftEndpoint leader, Throwable cause)
RaftException(Throwable cause)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RaftEndpoint
getLeader()
Returns the leader endpoint of the related Raft group, if available and known by the Raft node by the time this exception is thrown.String
toString()
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
RaftException
public RaftException(Throwable cause)
-
RaftException
public RaftException(RaftEndpoint leader)
-
RaftException
public RaftException(String message, RaftEndpoint leader)
-
RaftException
public RaftException(String message, RaftEndpoint leader, Throwable cause)
-
-
Method Detail
-
getLeader
public RaftEndpoint getLeader()
Returns the leader endpoint of the related Raft group, if available and known by the Raft node by the time this exception is thrown.- Returns:
- the leader endpoint of the related Raft group, if available and known by the Raft node by the time this exception is thrown
-
-