Class WatcherNodeStats.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • currentWatches

      public final WatcherNodeStats.Builder currentWatches(List<WatchRecordStats> list)
      The current executing watches metric gives insight into the watches that are currently being executed by Watcher. Additional information is shared per watch that is currently executing. This information includes the watch_id, the time its execution started and its current execution phase. To include this metric, the metric option should be set to current_watches or _all. In addition you can also specify the emit_stacktraces=true parameter, which adds stack traces for each watch that is being run. These stack traces can give you more insight into an execution of a watch.

      API name: current_watches

      Adds all elements of list to currentWatches.

    • currentWatches

      public final WatcherNodeStats.Builder currentWatches(WatchRecordStats value, WatchRecordStats... values)
      The current executing watches metric gives insight into the watches that are currently being executed by Watcher. Additional information is shared per watch that is currently executing. This information includes the watch_id, the time its execution started and its current execution phase. To include this metric, the metric option should be set to current_watches or _all. In addition you can also specify the emit_stacktraces=true parameter, which adds stack traces for each watch that is being run. These stack traces can give you more insight into an execution of a watch.

      API name: current_watches

      Adds one or more values to currentWatches.

    • currentWatches

      The current executing watches metric gives insight into the watches that are currently being executed by Watcher. Additional information is shared per watch that is currently executing. This information includes the watch_id, the time its execution started and its current execution phase. To include this metric, the metric option should be set to current_watches or _all. In addition you can also specify the emit_stacktraces=true parameter, which adds stack traces for each watch that is being run. These stack traces can give you more insight into an execution of a watch.

      API name: current_watches

      Adds a value to currentWatches using a builder lambda.

    • executionThreadPool

      public final WatcherNodeStats.Builder executionThreadPool(ExecutionThreadPool value)
      Required - API name: execution_thread_pool
    • executionThreadPool

      Required - API name: execution_thread_pool
    • queuedWatches

      public final WatcherNodeStats.Builder queuedWatches(List<WatchRecordQueuedStats> list)
      Watcher moderates the execution of watches such that their execution won't put too much pressure on the node and its resources. If too many watches trigger concurrently and there isn't enough capacity to run them all, some of the watches are queued, waiting for the current running watches to finish.s The queued watches metric gives insight on these queued watches.

      To include this metric, the metric option should include queued_watches or _all.

      API name: queued_watches

      Adds all elements of list to queuedWatches.

    • queuedWatches

      public final WatcherNodeStats.Builder queuedWatches(WatchRecordQueuedStats value, WatchRecordQueuedStats... values)
      Watcher moderates the execution of watches such that their execution won't put too much pressure on the node and its resources. If too many watches trigger concurrently and there isn't enough capacity to run them all, some of the watches are queued, waiting for the current running watches to finish.s The queued watches metric gives insight on these queued watches.

      To include this metric, the metric option should include queued_watches or _all.

      API name: queued_watches

      Adds one or more values to queuedWatches.

    • queuedWatches

      Watcher moderates the execution of watches such that their execution won't put too much pressure on the node and its resources. If too many watches trigger concurrently and there isn't enough capacity to run them all, some of the watches are queued, waiting for the current running watches to finish.s The queued watches metric gives insight on these queued watches.

      To include this metric, the metric option should include queued_watches or _all.

      API name: queued_watches

      Adds a value to queuedWatches using a builder lambda.

    • watchCount

      public final WatcherNodeStats.Builder watchCount(long value)
      Required - The number of watches currently registered.

      API name: watch_count

    • watcherState

      public final WatcherNodeStats.Builder watcherState(WatcherState value)
      Required - The current state of Watcher.

      API name: watcher_state

    • nodeId

      public final WatcherNodeStats.Builder nodeId(String value)
      Required - API name: node_id
    • self

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

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