@ConfigurationProperties(value="kubernetes.client.operator.leader-election.lock") public class LeaderElectionConfigurationProperties extends java.lang.Object implements LeaderElectionConfiguration
ConfigurationProperties
implementation of LeaderElectionConfiguration
.Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
DEFAULT_LEASE_DURATION_IN_SECONDS |
static java.lang.Integer |
DEFAULT_RENEW_DEADLINE_IN_SECONDS |
static java.lang.Integer |
DEFAULT_RETRY_PERIOD_IN_SECONDS |
static java.lang.String |
PREFIX |
Constructor and Description |
---|
LeaderElectionConfigurationProperties() |
Modifier and Type | Method and Description |
---|---|
java.time.Duration |
getLeaseDuration()
The lock lease duration.
|
java.time.Duration |
getRenewDeadline()
The lock renew deadline.
|
java.util.Optional<java.lang.String> |
getResourceName()
The lock resource name.
|
java.util.Optional<java.lang.String> |
getResourceNamespace()
The lock resource namespace.
|
java.time.Duration |
getRetryPeriod()
The lock acquire retry period.
|
void |
setLeaseDuration(java.time.Duration leaseDuration)
Sets the lock lease duration.
|
void |
setRenewDeadline(java.time.Duration renewDeadline)
Sets the lock renew deadline.
|
void |
setResourceName(java.lang.String resourceName)
Sets the lock resource name.
|
void |
setResourceNamespace(java.lang.String resourceNamespace)
Sets the lock resource namespace.
|
void |
setRetryPeriod(java.time.Duration retryPeriod)
Sets the lock acquire retry period.
|
public static final java.lang.String PREFIX
public static final java.lang.Integer DEFAULT_LEASE_DURATION_IN_SECONDS
public static final java.lang.Integer DEFAULT_RENEW_DEADLINE_IN_SECONDS
public static final java.lang.Integer DEFAULT_RETRY_PERIOD_IN_SECONDS
public LeaderElectionConfigurationProperties()
@NonNull public java.time.Duration getLeaseDuration()
LeaderElector
.
Default DEFAULT_LEASE_DURATION_IN_SECONDS
.getLeaseDuration
in interface LeaderElectionConfiguration
public void setLeaseDuration(@NonNull java.time.Duration leaseDuration)
leaseDuration
- lock lease duration.@NonNull public java.time.Duration getRenewDeadline()
LeaderElector
fails to
renew the lock within the deadline then the controller looses the lock. Default DEFAULT_RENEW_DEADLINE_IN_SECONDS
.getRenewDeadline
in interface LeaderElectionConfiguration
public void setRenewDeadline(@NonNull java.time.Duration renewDeadline)
LeaderElector
fails to
renew the lock within the deadline then the controller looses the lock.renewDeadline
- lock renew deadline.@NonNull public java.time.Duration getRetryPeriod()
LeaderElector
. Default
DEFAULT_RETRY_PERIOD_IN_SECONDS
.getRetryPeriod
in interface LeaderElectionConfiguration
public void setRetryPeriod(@NonNull java.time.Duration retryPeriod)
retryPeriod
- lock acquire retry period@NonNull public java.util.Optional<java.lang.String> getResourceName()
getResourceName
in interface LeaderElectionConfiguration
public void setResourceName(@NonNull java.lang.String resourceName)
resourceName
- lock resource name@NonNull public java.util.Optional<java.lang.String> getResourceNamespace()
getResourceNamespace
in interface LeaderElectionConfiguration
public void setResourceNamespace(@NonNull java.lang.String resourceNamespace)
resourceNamespace
- the lock resource namespace