Package io.microraft.exception
Class LaggingCommitIndexException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.microraft.exception.RaftException
io.microraft.exception.LaggingCommitIndexException
- All Implemented Interfaces:
Serializable
Thrown when a Raft node's current commit index is smaller than the commit
index specified in a
RaftNode.query(Object, QueryPolicy, long)
call.
This exception means that the Raft node instance cannot execute the given
query by preserving the monotonicity of the observed state. Please see the
Section: 6.4 Processing read-only queries more efficiently of the Raft
dissertation for more details.- See Also:
-
Constructor Summary
ConstructorDescriptionLaggingCommitIndexException
(long commitIndex, long expectedCommitIndex, 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
-
LaggingCommitIndexException
Creates an instance of this exception.- Parameters:
commitIndex
- the current commit index of the RaftNode which throws this exceptionexpectedCommitIndex
- the commit index expected by the callerleader
- the leader endpoint if it is known, null otherwise
-
-
Method Details
-
toString
- Overrides:
toString
in classRaftException
-