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.
  • Field Details

  • Constructor Details

    • Disk

      public Disk(RelativeByteSizeValue highWatermark, RelativeByteSizeValue floodStageWatermark, RelativeByteSizeValue frozenFloodStageWatermark, ByteSizeValue frozenFloodStageMaxHeadroom)
      Creates an instance of a Disk record class.
      Parameters:
      highWatermark - the value for the highWatermark record component
      floodStageWatermark - the value for the floodStageWatermark record component
      frozenFloodStageWatermark - the value for the frozenFloodStageWatermark record component
      frozenFloodStageMaxHeadroom - the value for the frozenFloodStageMaxHeadroom record component
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • isFragment

      public boolean isFragment()
      Specified by:
      isFragment in interface ToXContent
      Specified by:
      isFragment in interface ToXContentFragment
    • toXContent

      public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      IOException
    • describeHighWatermark

      public String describeHighWatermark()
    • describeFloodStageWatermark

      public String describeFloodStageWatermark()
    • describeFrozenFloodStageWatermark

      public String describeFrozenFloodStageWatermark()
    • equals

      public boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • highWatermark

      public RelativeByteSizeValue highWatermark()
      Returns the value of the highWatermark record component.
      Returns:
      the value of the highWatermark record component
    • floodStageWatermark

      public RelativeByteSizeValue floodStageWatermark()
      Returns the value of the floodStageWatermark record component.
      Returns:
      the value of the floodStageWatermark record component
    • frozenFloodStageWatermark

      public RelativeByteSizeValue frozenFloodStageWatermark()
      Returns the value of the frozenFloodStageWatermark record component.
      Returns:
      the value of the frozenFloodStageWatermark record component
    • frozenFloodStageMaxHeadroom

      public ByteSizeValue frozenFloodStageMaxHeadroom()
      Returns the value of the frozenFloodStageMaxHeadroom record component.
      Returns:
      the value of the frozenFloodStageMaxHeadroom record component