Class AllocationRecord.Builder

All Implemented Interfaces:
WithJson<AllocationRecord.Builder>, ObjectBuilder<AllocationRecord>
Enclosing class:
AllocationRecord

public static class AllocationRecord.Builder extends WithJsonObjectBuilderBase<AllocationRecord.Builder> implements ObjectBuilder<AllocationRecord>
Builder for AllocationRecord.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • shards

      public final AllocationRecord.Builder shards(@Nullable String value)
      Number of primary and replica shards assigned to the node.

      API name: shards

    • diskIndices

      public final AllocationRecord.Builder diskIndices(@Nullable String value)
      Disk space used by the node’s shards. Does not include disk space for the translog or unassigned shards. IMPORTANT: This metric double-counts disk space for hard-linked files, such as those created when shrinking, splitting, or cloning an index.

      API name: disk.indices

    • diskUsed

      public final AllocationRecord.Builder diskUsed(@Nullable String value)
      Total disk space in use. Elasticsearch retrieves this metric from the node’s operating system (OS). The metric includes disk space for: Elasticsearch, including the translog and unassigned shards; the node’s operating system; any other applications or files on the node. Unlike disk.indices, this metric does not double-count disk space for hard-linked files.

      API name: disk.used

    • diskAvail

      public final AllocationRecord.Builder diskAvail(@Nullable String value)
      Free disk space available to Elasticsearch. Elasticsearch retrieves this metric from the node’s operating system. Disk-based shard allocation uses this metric to assign shards to nodes based on available disk space.

      API name: disk.avail

    • diskTotal

      public final AllocationRecord.Builder diskTotal(@Nullable String value)
      Total disk space for the node, including in-use and available space.

      API name: disk.total

    • diskPercent

      public final AllocationRecord.Builder diskPercent(@Nullable String value)
      Total percentage of disk space in use. Calculated as disk.used / disk.total.

      API name: disk.percent

    • host

      public final AllocationRecord.Builder host(@Nullable String value)
      Network host for the node. Set using the network.host setting.

      API name: host

    • ip

      public final AllocationRecord.Builder ip(@Nullable String value)
      IP address and port for the node.

      API name: ip

    • node

      public final AllocationRecord.Builder node(@Nullable String value)
      Name for the node. Set using the node.name setting.

      API name: node

    • self

      protected AllocationRecord.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<AllocationRecord.Builder>
    • build

      public AllocationRecord build()
      Specified by:
      build in interface ObjectBuilder<AllocationRecord>
      Throws:
      NullPointerException - if some of the required fields are null.