public interface ConnectionPool
Modifier and Type | Method and 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.
|
Activator<Connection> |
getActivator()
Returns the activator for this pool.
|
Connection |
getConnection()
Returns an object from the pool.
|
Passivator<Connection> |
getPassivator()
Returns the passivator for this pool.
|
Set<PooledConnectionStatistics> |
getPooledConnectionStatistics()
Returns the statistics for each connection in the pool.
|
Validator<Connection> |
getValidator()
Returns the validator for this pool.
|
void |
initialize()
Initialize this pool for use.
|
void |
setActivator(Activator<Connection> a)
Sets the activator for this pool.
|
void |
setPassivator(Passivator<Connection> p)
Sets the passivator for this pool.
|
void |
setValidator(Validator<Connection> v)
Sets the validator for this pool.
|
Activator<Connection> getActivator()
void setActivator(Activator<Connection> a)
a
- activatorPassivator<Connection> getPassivator()
void setPassivator(Passivator<Connection> p)
p
- passivatorValidator<Connection> getValidator()
void setValidator(Validator<Connection> v)
v
- validatorvoid initialize()
Connection getConnection() throws PoolException
PoolException
- if this operation failsBlockingTimeoutException
- if this pool is configured with a block time and it occursPoolInterruptedException
- if this pool is configured with a block time and the current thread is
interruptedint availableCount()
int activeCount()
Set<PooledConnectionStatistics> getPooledConnectionStatistics()
void close()
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.