public static class LdapProviderConfig.PoolConfig
extends java.lang.Object
GenericObjectPool
)Constructor and Description |
---|
PoolConfig() |
Modifier and Type | Method and Description |
---|---|
int |
getMaxActive()
Returns the maximum number of objects that can be allocated by the pool
(checked out to clients, or idle awaiting checkout) at a given time.
|
long |
getMinEvictableIdleTimeMillis()
Returns the minimum amount of time a connection may sit idle in the pool
before it is eligible for eviction by the idle object evictor
(if running).
|
int |
getNumTestsPerEvictionRun()
Returns the max number of objects to examine during each run of the
idle object evictor thread (if any).
|
long |
getTimeBetweenEvictionRunsMillis()
Returns the number of milliseconds to sleep between runs of the
idle object evictor thread.
|
boolean |
lookupOnValidate()
Defines if the lookup on validate flag is enabled.
|
@NotNull LdapProviderConfig.PoolConfig |
setLookupOnValidate(boolean lookupOnValidate)
Sets the lookup on validate flag.
|
@NotNull LdapProviderConfig.PoolConfig |
setMaxActive(int maxActive)
Sets the cap on the number of objects that can be allocated by the pool.
|
LdapProviderConfig.PoolConfig |
setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
Sets the minimum amount of time a connection may sit idle in the pool
before it is eligible for eviction by the idle object evictor
(if any).
|
LdapProviderConfig.PoolConfig |
setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Sets the max number of objects to examine during each run of the
idle object evictor thread (if any).
|
LdapProviderConfig.PoolConfig |
setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
Sets the number of milliseconds to sleep between runs of the
idle object evictor thread.
|
java.lang.String |
toString() |
public int getMaxActive()
setMaxActive(int)
@NotNull public @NotNull LdapProviderConfig.PoolConfig setMaxActive(int maxActive)
maxActive
- the new upper limit of the pool sizegetMaxActive()
public boolean lookupOnValidate()
true
if the flag is enabled.@NotNull public @NotNull LdapProviderConfig.PoolConfig setLookupOnValidate(boolean lookupOnValidate)
lookupOnValidate
- the new value of the lookup on validate flaglookupOnValidate()
public long getMinEvictableIdleTimeMillis()
public LdapProviderConfig.PoolConfig setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
minEvictableIdleTimeMillis
- minimum amount of time a connection may sit idle in the pool before
it is eligible for eviction.public long getTimeBetweenEvictionRunsMillis()
public LdapProviderConfig.PoolConfig setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
timeBetweenEvictionRunsMillis
- number of milliseconds to sleep between evictor runs.public int getNumTestsPerEvictionRun()
setNumTestsPerEvictionRun(int)
,
setTimeBetweenEvictionRunsMillis(long)
public LdapProviderConfig.PoolConfig setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
When a negative value is supplied, ceil(number of idle objects)/abs(
tests will be run. That is, when the value is -n, roughly one nth of the
idle objects will be tested per run. When the value is positive, the number of tests
actually performed in each run will be the minimum of this value and the number of instances
idle in the pool.getNumTestsPerEvictionRun()
)
numTestsPerEvictionRun
- max number of objects to examine during each evictor run.getNumTestsPerEvictionRun()
,
setTimeBetweenEvictionRunsMillis(long)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.