Interface ConnectionPoolMetrics

All Known Subinterfaces:
HttpConnectionPoolMetrics

public interface ConnectionPoolMetrics
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Measure the current number of resources that have been successfully acquired and are in active use.
    int
    Measure the current number of allocated resources in the pool, acquired or idle.
    int
    Measure the current number of idle resources in the pool.
    int
    Get the maximum number of live resources this Pool will allow.
    int
    Get the maximum number of Pool.acquire() this Pool can queue in a pending state when no available resource is immediately handy (and the Pool cannot allocate more resources).
    int
    Measure the current number of "pending" acquire Monos in the Pool.
  • Method Details

    • acquiredSize

      int acquiredSize()
      Measure the current number of resources that have been successfully acquired and are in active use.
      Returns:
      the number of acquired resources
    • allocatedSize

      int allocatedSize()
      Measure the current number of allocated resources in the pool, acquired or idle.
      Returns:
      the total number of allocated resources managed by the pool
    • idleSize

      int idleSize()
      Measure the current number of idle resources in the pool.

      Note that some resources might be lazily evicted when they're next considered for an incoming acquire call. Such resources would still count towards this method.

      Returns:
      the number of idle resources
    • pendingAcquireSize

      int pendingAcquireSize()
      Measure the current number of "pending" acquire Monos in the Pool.

      An acquire is in the pending state when it is attempted at a point when no idle resource is available in the pool, and no new resource can be created.

      Returns:
      the number of pending acquire
    • maxAllocatedSize

      int maxAllocatedSize()
      Get the maximum number of live resources this Pool will allow.

      A Pool might be unbounded, in which case this method returns Integer.MAX_VALUE.

      Returns:
      the maximum number of live resources that can be allocated by this Pool
      Since:
      1.0.14
    • maxPendingAcquireSize

      int maxPendingAcquireSize()
      Get the maximum number of Pool.acquire() this Pool can queue in a pending state when no available resource is immediately handy (and the Pool cannot allocate more resources).

      A Pool pending queue might be unbounded, in which case this method returns Integer.MAX_VALUE.

      Returns:
      the maximum number of pending acquire that can be enqueued by this Pool
      Since:
      1.0.14