Package io.microraft.exception
Class MismatchingRaftGroupMembersCommitIndexException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- io.microraft.exception.RaftException
-
- io.microraft.exception.MismatchingRaftGroupMembersCommitIndexException
-
- All Implemented Interfaces:
Serializable
public class MismatchingRaftGroupMembersCommitIndexException extends RaftException
Thrown when a membership change is triggered with an expected group members commit index that doesn't match the current group members commit index in the local state of the Raft group leader. A group members commit index is the Raft log index at which the current Raft group member list is committed.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MismatchingRaftGroupMembersCommitIndexException(long commitIndex, Collection<RaftEndpoint> members)Creates an instance of this exception
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetCommitIndex()Returns the commit index of the current Raft group members.Collection<RaftEndpoint>getMembers()Returns the current Raft group members knwon by the Raft nodeStringtoString()-
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
-
MismatchingRaftGroupMembersCommitIndexException
public MismatchingRaftGroupMembersCommitIndexException(long commitIndex, Collection<RaftEndpoint> members)Creates an instance of this exception- Parameters:
commitIndex- the commit index of the current Raft group membersmembers- the current Raft group members knwon by the Raft node
-
-
Method Detail
-
getCommitIndex
public long getCommitIndex()
Returns the commit index of the current Raft group members.- Returns:
- the commit index of the current Raft group members.
-
getMembers
public Collection<RaftEndpoint> getMembers()
Returns the current Raft group members knwon by the Raft node- Returns:
- the current Raft group members knwon by the Raft node
-
toString
public String toString()
- Overrides:
toStringin classRaftException
-
-