Package org.ldaptive.pool
Interface ConnectionPool
-
- All Known Implementing Classes:
AbstractConnectionPool
,BlockingConnectionPool
,PooledConnectionFactory
public interface ConnectionPool
Provides an interface for connection pooling.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
activeCount()
Returns the number of connections in use.int
availableCount()
Returns the number of connections available for use.void
close()
Empty this pool, freeing any resources.Connection
getConnection()
Returns an object from the pool.Set<PooledConnectionStatistics>
getPooledConnectionStatistics()
Returns the statistics for each connection in the pool.void
initialize()
Initialize this pool for use.
-
-
-
Method Detail
-
initialize
void initialize()
Initialize this pool for use.
-
getConnection
Connection getConnection() throws PoolException
Returns an object from the pool.- Returns:
- pooled object
- Throws:
PoolException
- if this operation failsBlockingTimeoutException
- if this pool is configured with a block time and it occurs
-
availableCount
int availableCount()
Returns the number of connections available for use.- Returns:
- count
-
activeCount
int activeCount()
Returns the number of connections in use.- Returns:
- count
-
getPooledConnectionStatistics
Set<PooledConnectionStatistics> getPooledConnectionStatistics()
Returns the statistics for each connection in the pool.- Returns:
- connection statistics
-
close
void close()
Empty this pool, freeing any resources.
-
-