Class LeaderElectionConfigurationProperties
java.lang.Object
io.micronaut.kubernetes.client.operator.configuration.LeaderElectionConfigurationProperties
- All Implemented Interfaces:
LeaderElectionConfiguration
@ConfigurationProperties("kubernetes.client.operator.leader-election.lock")
public class LeaderElectionConfigurationProperties
extends Object
implements LeaderElectionConfiguration
ConfigurationProperties implementation of LeaderElectionConfiguration.- Since:
- 3.3
- Author:
- Pavol Gressa
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe lock lease duration.The lock renew deadline.The lock resource name.The lock resource namespace.The lock acquire retry period.voidsetLeaseDuration(Duration leaseDuration) Sets the lock lease duration.voidsetRenewDeadline(Duration renewDeadline) Sets the lock renew deadline.voidsetResourceName(@Nullable String resourceName) Sets the lock resource name.voidsetResourceNamespace(@Nullable String resourceNamespace) Sets the lock resource namespace.voidsetRetryPeriod(Duration retryPeriod) Sets the lock acquire retry period.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_LEASE_DURATION_IN_SECONDS
-
DEFAULT_RENEW_DEADLINE_IN_SECONDS
-
DEFAULT_RETRY_PERIOD_IN_SECONDS
-
-
Constructor Details
-
LeaderElectionConfigurationProperties
public LeaderElectionConfigurationProperties()
-
-
Method Details
-
getLeaseDuration
The lock lease duration. SeeLeaderElector. DefaultDEFAULT_LEASE_DURATION_IN_SECONDS.- Specified by:
getLeaseDurationin interfaceLeaderElectionConfiguration- Returns:
- lock lease duration
-
setLeaseDuration
Sets the lock lease duration.- Parameters:
leaseDuration- lock lease duration.
-
getRenewDeadline
The lock renew deadline. If theLeaderElectorfails to renew the lock within the deadline then the controller looses the lock. DefaultDEFAULT_RENEW_DEADLINE_IN_SECONDS.- Specified by:
getRenewDeadlinein interfaceLeaderElectionConfiguration- Returns:
- renew deadline
-
setRenewDeadline
Sets the lock renew deadline. If theLeaderElectorfails to renew the lock within the deadline then the controller looses the lock.- Parameters:
renewDeadline- lock renew deadline.
-
getRetryPeriod
The lock acquire retry period. SeeLeaderElector. DefaultDEFAULT_RETRY_PERIOD_IN_SECONDS.- Specified by:
getRetryPeriodin interfaceLeaderElectionConfiguration- Returns:
- lock acquire retry period.
-
setRetryPeriod
Sets the lock acquire retry period.- Parameters:
retryPeriod- lock acquire retry period
-
getResourceName
The lock resource name. If not provided then the application name is used.- Specified by:
getResourceNamein interfaceLeaderElectionConfiguration- Returns:
- the lock resource name
-
setResourceName
Sets the lock resource name.- Parameters:
resourceName- lock resource name
-
getResourceNamespace
The lock resource namespace. If not provided then the application namespaces is used.- Specified by:
getResourceNamespacein interfaceLeaderElectionConfiguration- Returns:
- the lock resource namespace
-
setResourceNamespace
Sets the lock resource namespace.- Parameters:
resourceNamespace- the lock resource namespace
-