Class V1alpha1LeaseCandidateSpec
java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1alpha1LeaseCandidateSpec
@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen")
public class V1alpha1LeaseCandidateSpec
extends Object
LeaseCandidateSpec is a specification of a Lease.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionV1alpha1LeaseCandidateSpec
(String leaseName, List<@NotNull String> preferredStrategies) -
Method Summary
Modifier and TypeMethodDescriptionaddpreferredStrategiesItem
(String preferredStrategiesItem) Add an item to the preferredStrategies property in a chainable fashion.binaryVersion
(String binaryVersion) Set binaryVersion in a chainable fashion.emulationVersion
(String emulationVersion) Set emulationVersion in a chainable fashion.boolean
BinaryVersion is the binary version.EmulationVersion is the emulation version.LeaseName is the name of the lease for which this candidate is contending.PingTime is the last time that the server has requested the LeaseCandidate to renew.PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election.RenewTime is the time that the LeaseCandidate was last updated.int
hashCode()
Set leaseName in a chainable fashion.pingTime
(ZonedDateTime pingTime) Set pingTime in a chainable fashion.preferredStrategies
(List<@NotNull String> preferredStrategies) Set preferredStrategies in a chainable fashion.renewTime
(ZonedDateTime renewTime) Set renewTime in a chainable fashion.void
setBinaryVersion
(String binaryVersion) Set the binaryVersion property valuevoid
setEmulationVersion
(String emulationVersion) Set the emulationVersion property valuevoid
setLeaseName
(String leaseName) Set the leaseName property valuevoid
setPingTime
(ZonedDateTime pingTime) Set the pingTime property valuevoid
setPreferredStrategies
(List<@NotNull String> preferredStrategies) Set the preferredStrategies property valuevoid
setRenewTime
(ZonedDateTime renewTime) Set the renewTime property valuetoString()
-
Field Details
-
JSON_PROPERTY_LEASE_NAME
- See Also:
-
JSON_PROPERTY_PREFERRED_STRATEGIES
- See Also:
-
JSON_PROPERTY_BINARY_VERSION
- See Also:
-
JSON_PROPERTY_EMULATION_VERSION
- See Also:
-
JSON_PROPERTY_PING_TIME
- See Also:
-
JSON_PROPERTY_RENEW_TIME
- See Also:
-
-
Constructor Details
-
V1alpha1LeaseCandidateSpec
-
-
Method Details
-
getLeaseName
LeaseName is the name of the lease for which this candidate is contending. This field is immutable.- Returns:
- the leaseName property value
-
setLeaseName
Set the leaseName property value- Parameters:
leaseName
- property value to set
-
leaseName
Set leaseName in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
getPreferredStrategies
PreferredStrategies indicates the list of strategies for picking the leader for coordinated leader election. The list is ordered, and the first strategy supersedes all other strategies. The list is used by coordinated leader election to make a decision about the final election strategy. This follows as - If all clients have strategy X as the first element in this list, strategy X will be used. - If a candidate has strategy [X] and another candidate has strategy [Y, X], Y supersedes X and strategy Y will be used. - If a candidate has strategy [X, Y] and another candidate has strategy [Y, X], this is a user error and leader election will not operate the Lease until resolved. (Alpha) Using this field requires the CoordinatedLeaderElection feature gate to be enabled.- Returns:
- the preferredStrategies property value
-
setPreferredStrategies
Set the preferredStrategies property value- Parameters:
preferredStrategies
- property value to set
-
preferredStrategies
Set preferredStrategies in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
addpreferredStrategiesItem
Add an item to the preferredStrategies property in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
getBinaryVersion
BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required when strategy is \"OldestEmulationVersion\"- Returns:
- the binaryVersion property value
-
setBinaryVersion
Set the binaryVersion property value- Parameters:
binaryVersion
- property value to set
-
binaryVersion
Set binaryVersion in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
getEmulationVersion
EmulationVersion is the emulation version. It must be in a semver format without leading `v`. EmulationVersion must be less than or equal to BinaryVersion. This field is required when strategy is \"OldestEmulationVersion\"- Returns:
- the emulationVersion property value
-
setEmulationVersion
Set the emulationVersion property value- Parameters:
emulationVersion
- property value to set
-
emulationVersion
Set emulationVersion in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
getPingTime
PingTime is the last time that the server has requested the LeaseCandidate to renew. It is only done during leader election to check if any LeaseCandidates have become ineligible. When PingTime is updated, the LeaseCandidate will respond by updating RenewTime.- Returns:
- the pingTime property value
-
setPingTime
Set the pingTime property value- Parameters:
pingTime
- property value to set
-
pingTime
Set pingTime in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
getRenewTime
RenewTime is the time that the LeaseCandidate was last updated. Any time a Lease needs to do leader election, the PingTime field is updated to signal to the LeaseCandidate that they should update the RenewTime. Old LeaseCandidate objects are also garbage collected if it has been hours since the last renew. The PingTime field is updated regularly to prevent garbage collection for still active LeaseCandidates.- Returns:
- the renewTime property value
-
setRenewTime
Set the renewTime property value- Parameters:
renewTime
- property value to set
-
renewTime
Set renewTime in a chainable fashion.- Returns:
- The same instance of V1alpha1LeaseCandidateSpec for chaining.
-
equals
-
hashCode
public int hashCode() -
toString
-