Record Class LeaderElectionRecord
java.lang.Object
java.lang.Record
io.micronaut.kubernetes.client.openapi.operator.leaderelection.LeaderElectionRecord
- Record Components:
holderIdentity
- the holder identityleaseDurationSeconds
- the lease duration in secondsacquireTime
- the acquire timerenewTime
- the renew timeleaderTransitions
- the count of leader transitions
public record LeaderElectionRecord(@Nullable String holderIdentity, int leaseDurationSeconds, @Nullable Date acquireTime, @Nullable Date renewTime, int leaderTransitions)
extends Record
Holder for leader election data.
-
Constructor Summary
ConstructorsConstructorDescriptionLeaderElectionRecord
(@Nullable String holderIdentity, int leaseDurationSeconds, @Nullable Date acquireTime, @Nullable Date renewTime, int leaderTransitions) Creates an instance of aLeaderElectionRecord
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Date
Returns the value of theacquireTime
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable String
Returns the value of theholderIdentity
record component.int
Returns the value of theleaderTransitions
record component.int
Returns the value of theleaseDurationSeconds
record component.@Nullable Date
Returns the value of therenewTime
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
LeaderElectionRecord
public LeaderElectionRecord() -
LeaderElectionRecord
public LeaderElectionRecord(@Nullable @Nullable String holderIdentity, int leaseDurationSeconds, @Nullable @Nullable Date acquireTime, @Nullable @Nullable Date renewTime, int leaderTransitions) Creates an instance of aLeaderElectionRecord
record class.- Parameters:
holderIdentity
- the value for theholderIdentity
record componentleaseDurationSeconds
- the value for theleaseDurationSeconds
record componentacquireTime
- the value for theacquireTime
record componentrenewTime
- the value for therenewTime
record componentleaderTransitions
- the value for theleaderTransitions
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
holderIdentity
Returns the value of theholderIdentity
record component.- Returns:
- the value of the
holderIdentity
record component
-
leaseDurationSeconds
public int leaseDurationSeconds()Returns the value of theleaseDurationSeconds
record component.- Returns:
- the value of the
leaseDurationSeconds
record component
-
acquireTime
Returns the value of theacquireTime
record component.- Returns:
- the value of the
acquireTime
record component
-
renewTime
Returns the value of therenewTime
record component.- Returns:
- the value of the
renewTime
record component
-
leaderTransitions
public int leaderTransitions()Returns the value of theleaderTransitions
record component.- Returns:
- the value of the
leaderTransitions
record component
-