Class ThreadCount.Builder

java.lang.Object
org.opensearch.client.util.ObjectBuilderBase
org.opensearch.client.opensearch.nodes.stats.ThreadCount.Builder
All Implemented Interfaces:
CopyableBuilder<ThreadCount.Builder,ThreadCount>, MutableBuilder<ThreadCount.Builder,ThreadCount>, ObjectBuilder<ThreadCount>
Enclosing class:
ThreadCount

public static class ThreadCount.Builder extends ObjectBuilderBase implements CopyableBuilder<ThreadCount.Builder,ThreadCount>
Builder for ThreadCount.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • copy

      @Nonnull public ThreadCount.Builder copy()
      Description copied from interface: CopyableBuilder
      Create a new builder CopyableBuilder that is a copy of this one.
      Specified by:
      copy in interface CopyableBuilder<ThreadCount.Builder,ThreadCount>
      Returns:
      a new builder instance.
    • active

      @Nonnull public final ThreadCount.Builder active(@Nullable Long value)
      Number of active threads in the thread pool.

      API name: active

    • completed

      @Nonnull public final ThreadCount.Builder completed(@Nullable Long value)
      Number of tasks completed by the thread pool executor.

      API name: completed

    • largest

      @Nonnull public final ThreadCount.Builder largest(@Nullable Long value)
      Highest number of active threads in the thread pool.

      API name: largest

    • queue

      @Nonnull public final ThreadCount.Builder queue(@Nullable Long value)
      Number of tasks in queue for the thread pool.

      API name: queue

    • rejected

      @Nonnull public final ThreadCount.Builder rejected(@Nullable Long value)
      Number of tasks rejected by the thread pool executor.

      API name: rejected

    • threads

      @Nonnull public final ThreadCount.Builder threads(@Nullable Long value)
      Number of threads in the thread pool.

      API name: threads

    • totalWaitTime

      @Nonnull public final ThreadCount.Builder totalWaitTime(@Nullable Time value)
      The total amount of time that tasks spend waiting in the thread pool queue. Currently, only search, search_throttled, and index_searcher thread pools support this metric.

      API name: total_wait_time

    • totalWaitTime

      @Nonnull public final ThreadCount.Builder totalWaitTime(Function<Time.Builder,ObjectBuilder<Time>> fn)
      The total amount of time that tasks spend waiting in the thread pool queue. Currently, only search, search_throttled, and index_searcher thread pools support this metric.

      API name: total_wait_time

    • totalWaitTimeInNanos

      @Nonnull public final ThreadCount.Builder totalWaitTimeInNanos(@Nullable Long value)
      The total amount of time that tasks spend waiting in the thread pool queue. Currently, only search, search_throttled, and index_searcher thread pools support this metric.

      API name: total_wait_time_in_nanos

    • build

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