Module org.elasticsearch.xcore
Record Class XPackLicenseStatus
java.lang.Object
java.lang.Record
org.elasticsearch.license.internal.XPackLicenseStatus
- Record Components:
mode- The current "mode" of the license (ie license type).active- True if the license is active, or false if it is expired.expiryWarning- A warning to be emitted on license checks about the license expiring soon.
public record XPackLicenseStatus(License.OperationMode mode, boolean active, String expiryWarning)
extends Record
A wrapper for the license mode, state, and expiration date, to allow atomically swapping.
-
Constructor Summary
ConstructorsConstructorDescriptionXPackLicenseStatus(License.OperationMode mode, boolean active, String expiryWarning) Creates an instance of aXPackLicenseStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Returns the value of theactiverecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiryWarningrecord component.final inthashCode()Returns a hash code value for this object.mode()Returns the value of themoderecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
XPackLicenseStatus
Creates an instance of aXPackLicenseStatusrecord class.- Parameters:
mode- the value for themoderecord componentactive- the value for theactiverecord componentexpiryWarning- the value for theexpiryWarningrecord 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 '=='. -
mode
Returns the value of themoderecord component.- Returns:
- the value of the
moderecord component
-
active
public boolean active()Returns the value of theactiverecord component.- Returns:
- the value of the
activerecord component
-
expiryWarning
Returns the value of theexpiryWarningrecord component.- Returns:
- the value of the
expiryWarningrecord component
-