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.Params
Nested 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 aDisk
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.Returns the value of thefloodStageMaxHeadroom
record component.Returns the value of thefloodStageWatermark
record component.Returns the value of thefrozenFloodStageMaxHeadroom
record component.Returns the value of thefrozenFloodStageWatermark
record component.int
hashCode()
Returns a hash code value for this object.Returns the value of thehighMaxHeadroom
record component.Returns the value of thehighWatermark
record component.static HealthMetadata.Disk.Builder
static HealthMetadata.Disk.Builder
final String
toString()
Returns a string representation of this record class.toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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 aDisk
record class.- Parameters:
highWatermark
- the value for thehighWatermark
record componenthighMaxHeadroom
- the value for thehighMaxHeadroom
record componentfloodStageWatermark
- the value for thefloodStageWatermark
record componentfloodStageMaxHeadroom
- the value for thefloodStageMaxHeadroom
record componentfrozenFloodStageWatermark
- the value for thefrozenFloodStageWatermark
record componentfrozenFloodStageMaxHeadroom
- the value for thefrozenFloodStageMaxHeadroom
record component
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in 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 thehighWatermark
record component.- Returns:
- the value of the
highWatermark
record component
-
highMaxHeadroom
Returns the value of thehighMaxHeadroom
record component.- Returns:
- the value of the
highMaxHeadroom
record component
-
floodStageWatermark
Returns the value of thefloodStageWatermark
record component.- Returns:
- the value of the
floodStageWatermark
record component
-
floodStageMaxHeadroom
Returns the value of thefloodStageMaxHeadroom
record component.- Returns:
- the value of the
floodStageMaxHeadroom
record component
-
frozenFloodStageWatermark
Returns the value of thefrozenFloodStageWatermark
record component.- Returns:
- the value of the
frozenFloodStageWatermark
record component
-
frozenFloodStageMaxHeadroom
Returns the value of thefrozenFloodStageMaxHeadroom
record component.- Returns:
- the value of the
frozenFloodStageMaxHeadroom
record component
-