Top Description Methods
reactor.pool

public Interface PoolMetricsRecorder

Known Direct Implementers
reactor.pool.NoOpPoolMetricsRecorder

An interface representing ways for Pool to collect instrumentation data. Some methods are pool-implementation specific.

Note this doesn't include the concepts of measuring timings, which should be the responsibility of a java.time.Clock.

Authors
Simon Baslé, Violeta Georgieva

Method Summary

Modifier and TypeMethod and Description
public void
recordAllocationFailureAndLatency(long
the latency in milliseconds
latencyMs
)

Record a latency for failed allocation.

public void
recordAllocationSuccessAndLatency(long
the latency in milliseconds
latencyMs
)

Record a latency for successful allocation.

public void
recordDestroyLatency(long
the latency in milliseconds
latencyMs
)

Record a latency for destroying a resource.

public void
recordFastPath()

Record the fact that a Pool has a fast path of recycling and just used it.

public void
recordIdleTime(long
the number of milliseconds an object that was just acquired had previously been idle
millisecondsIdle
)

Record the number of milliseconds an object had been idle when it gets pulled from the pool and passed to a borrower.

public void
recordLifetimeDuration(long
the number of milliseconds since the object was allocated, at the time it is destroyed
millisecondsSinceAllocation
)

Record the number of milliseconds a pooled object has been live (ie time between allocation and destruction).

public default void
recordPendingFailureAndLatency(long
the latency in milliseconds
latencyMs
)

Record a latency for failed pending acquire.

public default void
recordPendingSuccessAndLatency(long
the latency in milliseconds
latencyMs
)

Record a latency for successful pending acquire operation.

public void
recordRecycled()

Record the fact that a resource was recycled, ie it was reset and tested for reuse.

public void
recordResetLatency(long
the latency in milliseconds
latencyMs
)

Record a latency for resetting a resource to a reusable state.

public void
recordSlowPath()

Record the fact that a Pool has a slow path of recycling and just used it.

Method Detail

recordAllocationFailureAndLatencyback to summary
public void recordAllocationFailureAndLatency(long latencyMs)

Record a latency for failed allocation. Implies incrementing an allocation failure counter as well.

Parameters
latencyMs:long

the latency in milliseconds

recordAllocationSuccessAndLatencyback to summary
public void recordAllocationSuccessAndLatency(long latencyMs)

Record a latency for successful allocation. Implies incrementing an allocation success counter as well.

Parameters
latencyMs:long

the latency in milliseconds

recordDestroyLatencyback to summary
public void recordDestroyLatency(long latencyMs)

Record a latency for destroying a resource. Implies incrementing a counter as well.

Parameters
latencyMs:long

the latency in milliseconds

recordFastPathback to summary
public void recordFastPath()

Record the fact that a Pool has a fast path of recycling and just used it.

recordIdleTimeback to summary
public void recordIdleTime(long millisecondsIdle)

Record the number of milliseconds an object had been idle when it gets pulled from the pool and passed to a borrower.

Parameters
millisecondsIdle:long

the number of milliseconds an object that was just acquired had previously been idle

recordLifetimeDurationback to summary
public void recordLifetimeDuration(long millisecondsSinceAllocation)

Record the number of milliseconds a pooled object has been live (ie time between allocation and destruction).

Parameters
millisecondsSinceAllocation:long

the number of milliseconds since the object was allocated, at the time it is destroyed

recordPendingFailureAndLatencyback to summary
public default void recordPendingFailureAndLatency(long latencyMs)

Record a latency for failed pending acquire. A failed pending acquire operation is such that finishes with PoolAcquireTimeoutException. Implies incrementing a pending acquire failure counter as well.

Parameters
latencyMs:long

the latency in milliseconds

Since
1.0.4
recordPendingSuccessAndLatencyback to summary
public default void recordPendingSuccessAndLatency(long latencyMs)

Record a latency for successful pending acquire operation. A successful pending acquire operation is such that triggers an allocation operation. Implies incrementing a pending acquire success counter as well.

Parameters
latencyMs:long

the latency in milliseconds

Since
1.0.4
recordRecycledback to summary
public void recordRecycled()

Record the fact that a resource was recycled, ie it was reset and tested for reuse.

recordResetLatencyback to summary
public void recordResetLatency(long latencyMs)

Record a latency for resetting a resource to a reusable state. Implies incrementing a counter as well.

Parameters
latencyMs:long

the latency in milliseconds

recordSlowPathback to summary
public void recordSlowPath()

Record the fact that a Pool has a slow path of recycling and just used it.