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, RelativeByteSizeValue floodStageWatermark, 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 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
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionDisk
(RelativeByteSizeValue highWatermark, RelativeByteSizeValue floodStageWatermark, 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 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 thehighWatermark
record component.boolean
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.
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
Disk
public Disk(RelativeByteSizeValue highWatermark, RelativeByteSizeValue floodStageWatermark, RelativeByteSizeValue frozenFloodStageWatermark, ByteSizeValue frozenFloodStageMaxHeadroom) Creates an instance of aDisk
record class.- Parameters:
highWatermark
- the value for thehighWatermark
record componentfloodStageWatermark
- the value for thefloodStageWatermark
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
-
isFragment
public boolean isFragment()- Specified by:
isFragment
in interfaceToXContent
- Specified by:
isFragment
in interfaceToXContentFragment
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
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. -
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
-
floodStageWatermark
Returns the value of thefloodStageWatermark
record component.- Returns:
- the value of the
floodStageWatermark
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
-