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 aLeaderElectionRecordrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable DateReturns the value of theacquireTimerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theholderIdentityrecord component.intReturns the value of theleaderTransitionsrecord component.intReturns the value of theleaseDurationSecondsrecord component.@Nullable DateReturns the value of therenewTimerecord component.final StringtoString()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 aLeaderElectionRecordrecord class.- Parameters:
holderIdentity- the value for theholderIdentityrecord componentleaseDurationSeconds- the value for theleaseDurationSecondsrecord componentacquireTime- the value for theacquireTimerecord componentrenewTime- the value for therenewTimerecord componentleaderTransitions- the value for theleaderTransitionsrecord 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 theholderIdentityrecord component.- Returns:
- the value of the
holderIdentityrecord component
-
leaseDurationSeconds
public int leaseDurationSeconds()Returns the value of theleaseDurationSecondsrecord component.- Returns:
- the value of the
leaseDurationSecondsrecord component
-
acquireTime
Returns the value of theacquireTimerecord component.- Returns:
- the value of the
acquireTimerecord component
-
renewTime
Returns the value of therenewTimerecord component.- Returns:
- the value of the
renewTimerecord component
-
leaderTransitions
public int leaderTransitions()Returns the value of theleaderTransitionsrecord component.- Returns:
- the value of the
leaderTransitionsrecord component
-