Module org.elasticsearch.server
Record Class HealthMetadata.Disk
java.lang.Object
java.lang.Record
org.elasticsearch.health.metadata.HealthMetadata.Disk
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentFragment
- Enclosing class:
HealthMetadata
public static record HealthMetadata.Disk(RelativeByteSizeValue highWatermark, ByteSizeValue highMaxHeadroom, RelativeByteSizeValue floodStageWatermark, ByteSizeValue floodStageMaxHeadroom, RelativeByteSizeValue frozenFloodStageWatermark, ByteSizeValue frozenFloodStageMaxHeadroom)
extends Record
implements ToXContentFragment, Writeable
Contains the thresholds necessary to determine the health of the disk space of a node. The thresholds are determined by the elected
master.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDisk(RelativeByteSizeValue highWatermark, ByteSizeValue highMaxHeadroom, RelativeByteSizeValue floodStageWatermark, ByteSizeValue floodStageMaxHeadroom, RelativeByteSizeValue frozenFloodStageWatermark, ByteSizeValue frozenFloodStageMaxHeadroom) Creates an instance of aDiskrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.Returns the value of thefloodStageMaxHeadroomrecord component.Returns the value of thefloodStageWatermarkrecord component.Returns the value of thefrozenFloodStageMaxHeadroomrecord component.Returns the value of thefrozenFloodStageWatermarkrecord component.inthashCode()Returns a hash code value for this object.Returns the value of thehighMaxHeadroomrecord component.Returns the value of thehighWatermarkrecord component.static HealthMetadata.Disk.Builderstatic HealthMetadata.Disk.Builderfinal StringtoString()Returns a string representation of this record class.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
TYPE
- See Also:
-
VERSION_SUPPORTING_HEADROOM_FIELDS
-
-
Constructor Details
-
Disk
public Disk(RelativeByteSizeValue highWatermark, ByteSizeValue highMaxHeadroom, RelativeByteSizeValue floodStageWatermark, ByteSizeValue floodStageMaxHeadroom, RelativeByteSizeValue frozenFloodStageWatermark, ByteSizeValue frozenFloodStageMaxHeadroom) Creates an instance of aDiskrecord class.- Parameters:
highWatermark- the value for thehighWatermarkrecord componenthighMaxHeadroom- the value for thehighMaxHeadroomrecord componentfloodStageWatermark- the value for thefloodStageWatermarkrecord componentfloodStageMaxHeadroom- the value for thefloodStageMaxHeadroomrecord componentfrozenFloodStageWatermark- the value for thefrozenFloodStageWatermarkrecord componentfrozenFloodStageMaxHeadroom- the value for thefrozenFloodStageMaxHeadroomrecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
getFreeBytesHighWatermark
-
getFreeBytesFloodStageWatermark
-
getFreeBytesFrozenFloodStageWatermark
-
describeHighWatermark
-
describeFloodStageWatermark
-
describeFrozenFloodStageWatermark
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
newBuilder
-
newBuilder
-
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. -
highWatermark
Returns the value of thehighWatermarkrecord component.- Returns:
- the value of the
highWatermarkrecord component
-
highMaxHeadroom
Returns the value of thehighMaxHeadroomrecord component.- Returns:
- the value of the
highMaxHeadroomrecord component
-
floodStageWatermark
Returns the value of thefloodStageWatermarkrecord component.- Returns:
- the value of the
floodStageWatermarkrecord component
-
floodStageMaxHeadroom
Returns the value of thefloodStageMaxHeadroomrecord component.- Returns:
- the value of the
floodStageMaxHeadroomrecord component
-
frozenFloodStageWatermark
Returns the value of thefrozenFloodStageWatermarkrecord component.- Returns:
- the value of the
frozenFloodStageWatermarkrecord component
-
frozenFloodStageMaxHeadroom
Returns the value of thefrozenFloodStageMaxHeadroomrecord component.- Returns:
- the value of the
frozenFloodStageMaxHeadroomrecord component
-