Package org.kiwiproject.curator.leader
Interface LeadershipStatus.ValidLeadershipStatus
- All Superinterfaces:
LeadershipStatus
- All Known Implementing Classes:
LeadershipStatus.IsLeader,LeadershipStatus.NotLeader
- Enclosing interface:
- LeadershipStatus
public static sealed interface LeadershipStatus.ValidLeadershipStatus
extends LeadershipStatus
permits LeadershipStatus.IsLeader, LeadershipStatus.NotLeader
Defines a valid leadership status.
-
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 booleanCheck whether the status is from a bad latch state, where the Curator client or theLeaderLatchmight 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:LeadershipStatusCheck whether the status is from a bad latch state, where the Curator client or theLeaderLatchmight not be started or there are no participants in the latch.- Specified by:
isErrorStatusin interfaceLeadershipStatus- Returns:
- true if the leadership status is from an invalid latch state, otherwise false
-