Package codes.grow.packages.openbao
Record Class LeaderStatus
java.lang.Object
java.lang.Record
codes.grow.packages.openbao.LeaderStatus
- Record Components:
haEnabled- whether high availability is enabledisSelf- whether this node is the leaderactiveTime- when the leader became activeleaderAddress- leader API addressleaderClusterAddress- leader cluster address
public record LeaderStatus(boolean haEnabled, boolean isSelf, Optional<Instant> activeTime, String leaderAddress, String leaderClusterAddress)
extends Record
Leader status (
GET sys/leader).-
Constructor Summary
ConstructorsConstructorDescriptionLeaderStatus(boolean haEnabled, boolean isSelf, Optional<Instant> activeTime, String leaderAddress, String leaderClusterAddress) Creates an instance of aLeaderStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveTimerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehaEnabledrecord component.final inthashCode()Returns a hash code value for this object.booleanisSelf()Returns the value of theisSelfrecord component.Returns the value of theleaderAddressrecord component.Returns the value of theleaderClusterAddressrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LeaderStatus
public LeaderStatus(boolean haEnabled, boolean isSelf, Optional<Instant> activeTime, String leaderAddress, String leaderClusterAddress) Creates an instance of aLeaderStatusrecord class.- Parameters:
haEnabled- the value for thehaEnabledrecord componentisSelf- the value for theisSelfrecord componentactiveTime- the value for theactiveTimerecord componentleaderAddress- the value for theleaderAddressrecord componentleaderClusterAddress- the value for theleaderClusterAddressrecord 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 '=='. -
haEnabled
public boolean haEnabled()Returns the value of thehaEnabledrecord component.- Returns:
- the value of the
haEnabledrecord component
-
isSelf
public boolean isSelf()Returns the value of theisSelfrecord component.- Returns:
- the value of the
isSelfrecord component
-
activeTime
Returns the value of theactiveTimerecord component.- Returns:
- the value of the
activeTimerecord component
-
leaderAddress
Returns the value of theleaderAddressrecord component.- Returns:
- the value of the
leaderAddressrecord component
-
leaderClusterAddress
Returns the value of theleaderClusterAddressrecord component.- Returns:
- the value of the
leaderClusterAddressrecord component
-