Package com.zaxxer.hikari

## Interface HikariPoolMXBean

    public interface HikariPoolMXBean

The javax.management MBean for a Hikari pool instance.

Author:
  Brett Wooldridge

### Method Summary

All Methods Instance Methods Abstract Methods
`int` `getActiveConnections()` Get the number of currently active connections in the pool.
`int` `getIdleConnections()` Get the number of currently idle connections in the pool.
`int` `getThreadsAwaitingConnection()` Get the number of threads awaiting connections from the pool.
`int` `getTotalConnections()` Get the total number of connections currently in the pool.
`void` `resumePool()` Resume the pool.
`void` `softEvictConnections()` Evict currently idle connections from the pool, and mark active (in-use) connections for eviction when they are returned to the pool.
`void` `suspendPool()` Suspend the pool.

### Method Detail

#### getIdleConnections

    int getIdleConnections()

Get the number of currently idle connections in the pool.

The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time difference between invoking this method and `getActiveConnections()`, it is possible for the sum of idle plus active connections to be either less than or greater than the value returned by `getTotalConnections()`.

Returns:
  the current number of idle connections in the pool

#### getActiveConnections

    int getActiveConnections()

Get the number of currently active connections in the pool.

The return value is extremely transient and is a point-in-time measurement. Therefore, due to a time difference between invoking this method and `getIdleConnections()`, it is possible for the sum of idle plus active connections to be either less than or greater than the value returned by `getTotalConnections()`.

Returns:
  the current number of active (in-use) connections in the pool

#### getTotalConnections

    int getTotalConnections()

Get the total number of connections currently in the pool. The return value is transient and is a point-in-time measurement.

Returns:
  the total number of connections in the pool

#### getThreadsAwaitingConnection

    int getThreadsAwaitingConnection()

Get the number of threads awaiting connections from the pool. The return value is extremely transient and is a point-in-time measurement.

Returns:
  the number of threads awaiting a connection from the pool

#### softEvictConnections

    void softEvictConnections()

Evict currently idle connections from the pool, and mark active (in-use) connections for eviction when they are returned to the pool.

#### suspendPool

    void suspendPool()

Suspend the pool. When the pool is suspended, threads calling `DataSource.getConnection()` will be blocked with no timeout until the pool is resumed via the `resumePool()` method.
This method has no effect unless the `HikariConfig.setAllowPoolSuspension(boolean)` method or equivalent property has been set to `true`.

#### resumePool

    void resumePool()

Resume the pool. Enables connection borrowing to resume on a pool that has been suspended via the `suspendPool()` method.
This method has no effect unless the `HikariConfig.setAllowPoolSuspension(boolean)` method or equivalent property has been set to `true`.