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

- - ### Method Summary

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

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

      `close, isEnabled`

- - ### Method Detail

    - #### submitted

          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

          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

          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

          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 © 2016. All rights reserved.