edu.vt.middleware.ldap.pool
T
- type of ldap objectpublic interface LdapPool<T extends BaseLdap>
LdapPool
provides an interface for pooling ldap objects.Modifier and Type | Method and Description |
---|---|
int |
activeCount()
Returns the number of ldap objects in use.
|
int |
availableCount()
Returns the number of ldap objects available for use.
|
void |
checkIn(T t)
Returns an ldap object to the pool.
|
T |
checkOut()
Returns an ldap object from the pool.
|
void |
close()
Empty this pool, closing all connections, and freeing any resources.
|
LdapPoolConfig |
getLdapPoolConfig()
Returns the configuration for this pool.
|
void |
initialize()
Initialize this pool for use.
|
void |
prune()
Attempts to reduce the size of the pool back to it's configured minimum.
|
void |
setPoolTimer(java.util.Timer t)
Sets the pool to use an existing timer.
|
void |
validate()
Attempts to validate all objects in the pool.
|
LdapPoolConfig getLdapPoolConfig()
void setPoolTimer(java.util.Timer t)
initialize()
.t
- timer used to schedule pool tasksvoid initialize()
void close()
T checkOut() throws LdapPoolException
LdapPoolException
- 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 interruptedvoid checkIn(T t)
t
- ldap objectvoid prune()
LdapPoolConfig.setMinPoolSize(int)
.void validate()
LdapPoolConfig.setValidatePeriodically(boolean)
.int availableCount()
int activeCount()
Copyright © 2014. All Rights Reserved.