Class LeaderUtils
java.lang.Object
org.springframework.cloud.kubernetes.commons.leader.LeaderUtils
- Author:
- wind57
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCoordination group for leader election.static final StringCoordination version for leader election.static final StringProperty that controls whether leader election is enabled.static final StringPrefix for all properties related to leader election.static final StringLease constant. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidguarded(ReentrantLock lock, Runnable runnable) static StringhostName()Ideally, should always be present.
-
Field Details
-
COORDINATION_GROUP
Coordination group for leader election.- See Also:
-
COORDINATION_VERSION
Coordination version for leader election.- See Also:
-
LEASE
Lease constant.- See Also:
-
LEADER_ELECTION_PROPERTY_PREFIX
Prefix for all properties related to leader election.- See Also:
-
LEADER_ELECTION_ENABLED_PROPERTY
Property that controls whether leader election is enabled.- See Also:
-
-
Method Details
-
podNamespace
Ideally, should always be present. If not, downward API must enable this one. -
hostName
- Throws:
UnknownHostException
-
guarded
-