Top Description Fields Methods
io.vertx.core.spi.metrics

public Interface PoolMetrics<T>

extends Metrics
Known Direct Implementers
io.vertx.core.metrics.impl.DummyVertxMetrics.DummyWorkerPoolMetrics

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

Inherited from io.vertx.core.spi.metrics.Metrics:
DISABLE_METRICS_PROPERTY_NAMEMETRICS_ENABLED

Method Summary

Modifier and TypeMethod and Description
public default T

Returns:

the timer measuring the task execution
begin
(T
the timer measuring the task queuing returned by submitted()
t
)

The submitted task start to use the resource.

public default void
end(T
the timer measuring the task execution returned by begin
t
,
boolean
whether or not the task has gracefully completed
succeeded
)

The submitted tasks has completed its execution and release the resource.

public default void
rejected(T
the timer measuring the task queuing returned by submitted()
t
)

The task has been rejected.

public default T

Returns:

the timer measuring the task queuing
submitted
()

A new task has been submitted to access the resource.

Inherited from io.vertx.core.spi.metrics.Metrics:
close

Method Detail

beginback to summary
public default T begin(T t)

The submitted task start to use the resource.

Parameters
t:T

the timer measuring the task queuing returned by submitted()

Returns:T

the timer measuring the task execution

endback to summary
public default void end(T t, boolean succeeded)

The submitted tasks has completed its execution and release the resource.

Parameters
t:T

the timer measuring the task execution returned by begin

succeeded:boolean

whether or not the task has gracefully completed

rejectedback to summary
public default void rejected(T t)

The task has been rejected. The underlying resource has probably be shutdown.

Parameters
t:T

the timer measuring the task queuing returned by submitted()

submittedback to summary
public default T submitted()

A new task has been submitted to access the resource. This method is called from the submitter context.

Returns:T

the timer measuring the task queuing