Package org.kiwiproject.curator.leader
Interface LeadershipStatus.ErrorLeadershipStatus
- All Superinterfaces:
LeadershipStatus
- All Known Implementing Classes:
LeadershipStatus.CuratorNotStarted
,LeadershipStatus.LatchNotStarted
,LeadershipStatus.NoLatchParticipants
,LeadershipStatus.OtherError
- Enclosing interface:
- LeadershipStatus
public static sealed interface LeadershipStatus.ErrorLeadershipStatus
extends LeadershipStatus
permits LeadershipStatus.CuratorNotStarted, LeadershipStatus.LatchNotStarted, LeadershipStatus.NoLatchParticipants, LeadershipStatus.OtherError
Defines an invalid leadership status caused by an error or erroneous state.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.kiwiproject.curator.leader.LeadershipStatus
LeadershipStatus.CuratorNotStarted, LeadershipStatus.ErrorLeadershipStatus, LeadershipStatus.IsLeader, LeadershipStatus.LatchNotStarted, LeadershipStatus.NoLatchParticipants, LeadershipStatus.NotLeader, LeadershipStatus.OtherError, LeadershipStatus.ValidLeadershipStatus
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Check whether the status is from a bad latch state, where the Curator client or theLeaderLatch
might not be started or there are no participants in the latch.Methods inherited from interface org.kiwiproject.curator.leader.LeadershipStatus
isValidStatus
-
Method Details
-
isErrorStatus
default boolean isErrorStatus()Description copied from interface:LeadershipStatus
Check whether the status is from a bad latch state, where the Curator client or theLeaderLatch
might not be started or there are no participants in the latch.- Specified by:
isErrorStatus
in interfaceLeadershipStatus
- Returns:
- true if the leadership status is from an invalid latch state, otherwise false
-