Class V1beta1LeaseCandidateSpec
java.lang.Object
io.kubernetes.client.openapi.models.V1beta1LeaseCandidateSpec
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
date="2025-05-20T20:47:13.890592Z[Etc/UTC]",
comments="Generator version: 7.13.0")
public class V1beta1LeaseCandidateSpec
extends Object
LeaseCandidateSpec is a specification of a Lease.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbinaryVersion
(String binaryVersion) emulationVersion
(String emulationVersion) boolean
static V1beta1LeaseCandidateSpec
Create an instance of V1beta1LeaseCandidateSpec given an JSON stringBinaryVersion 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.RenewTime is the time that the LeaseCandidate was last updated.Strategy is the strategy that coordinated leader election will use for picking the leader.int
hashCode()
pingTime
(OffsetDateTime pingTime) renewTime
(OffsetDateTime renewTime) void
setBinaryVersion
(String binaryVersion) void
setEmulationVersion
(String emulationVersion) void
setLeaseName
(String leaseName) void
setPingTime
(OffsetDateTime pingTime) void
setRenewTime
(OffsetDateTime renewTime) void
setStrategy
(String strategy) toJson()
Convert an instance of V1beta1LeaseCandidateSpec to an JSON stringtoString()
static void
validateJsonElement
(com.google.gson.JsonElement jsonElement) Validates the JSON Element and throws an exception if issues found
-
Field Details
-
SERIALIZED_NAME_BINARY_VERSION
- See Also:
-
SERIALIZED_NAME_EMULATION_VERSION
- See Also:
-
SERIALIZED_NAME_LEASE_NAME
- See Also:
-
SERIALIZED_NAME_PING_TIME
- See Also:
-
SERIALIZED_NAME_RENEW_TIME
- See Also:
-
SERIALIZED_NAME_STRATEGY
- See Also:
-
openapiFields
-
openapiRequiredFields
-
-
Constructor Details
-
V1beta1LeaseCandidateSpec
public V1beta1LeaseCandidateSpec()
-
-
Method Details
-
binaryVersion
-
getBinaryVersion
BinaryVersion is the binary version. It must be in a semver format without leading `v`. This field is required.- Returns:
- binaryVersion
-
setBinaryVersion
-
emulationVersion
-
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:
- emulationVersion
-
setEmulationVersion
-
leaseName
-
getLeaseName
LeaseName is the name of the lease for which this candidate is contending. The limits on this field are the same as on Lease.name. Multiple lease candidates may reference the same Lease.name. This field is immutable.- Returns:
- leaseName
-
setLeaseName
-
pingTime
-
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:
- pingTime
-
setPingTime
-
renewTime
-
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:
- renewTime
-
setRenewTime
-
strategy
-
getStrategy
Strategy is the strategy that coordinated leader election will use for picking the leader. If multiple candidates for the same Lease return different strategies, the strategy provided by the candidate with the latest BinaryVersion will be used. If there is still conflict, this is a user error and coordinated leader election will not operate the Lease until resolved.- Returns:
- strategy
-
setStrategy
-
equals
-
hashCode
public int hashCode() -
toString
-
validateJsonElement
Validates the JSON Element and throws an exception if issues found- Parameters:
jsonElement
- JSON Element- Throws:
IOException
- if the JSON Element is invalid with respect to V1beta1LeaseCandidateSpec
-
fromJson
Create an instance of V1beta1LeaseCandidateSpec given an JSON string- Parameters:
jsonString
- JSON string- Returns:
- An instance of V1beta1LeaseCandidateSpec
- Throws:
IOException
- if the JSON string is invalid with respect to V1beta1LeaseCandidateSpec
-
toJson
Convert an instance of V1beta1LeaseCandidateSpec to an JSON string- Returns:
- JSON string
-