io.vertx.core.spi.metrics

## Interface PoolMetrics<T>

- All Superinterfaces:
    Metrics

      public interface PoolMetrics<T>
      extends Metrics

  An SPI used internally by Vert.x to gather metrics on pools used by Vert.x (execute blocking, worker verticle or data source).

  Usually these metrics measure the latency of a task queuing and the latency a task execution.

  Author:
    Clement Escoffier

- - ### Field Summary

    - ### Fields inherited from interface io.vertx.core.spi.metrics.Metrics

      `DISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED`

  - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default T` | `begin(T t)` The submitted task start to use the resource.
    `default void` | `end(T t, boolean succeeded)` The submitted tasks has completed its execution and release the resource.
    `default void` | `rejected(T t)` The task has been rejected.
    `default T` | `submitted()` A new task has been submitted to access the resource.

    - ### Methods inherited from interface io.vertx.core.spi.metrics.Metrics

      `close`

- - ### Method Detail

    - #### submitted

          default T submitted()

      A new task has been submitted to access the resource. This method is called from the submitter context.
      Returns:
        the timer measuring the task queuing

    - #### begin

          default T begin(T t)

      The submitted task start to use the resource.
      Parameters:
        `t` - the timer measuring the task queuing returned by `submitted()`
      Returns:
        the timer measuring the task execution

    - #### rejected

          default void rejected(T t)

      The task has been rejected. The underlying resource has probably be shutdown.
      Parameters:
        `t` - the timer measuring the task queuing returned by `submitted()`

    - #### end

          default void end(T t,
                           boolean succeeded)

      The submitted tasks has completed its execution and release the resource.
      Parameters:
        `succeeded` - whether or not the task has gracefully completed
        `t` - the timer measuring the task execution returned by `begin(T)`

Copyright © 2022 Eclipse. All rights reserved.