- java.lang.Object
-
- com.github.robtimus.pool.PoolConfig
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPoolConfig.BuilderA builder forPoolConfigobjects.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PoolConfig.Buildercustom()Returns a new builder for creatingPoolConfigobjects.static PoolConfigdefaultConfig()Returns a defaultPoolConfigobject.intinitialSize()Returns the initial pool size.Optional<Duration>maxIdleTime()Returns the maximum time that objects can be idle.intmaxSize()Returns the maximum pool size.Optional<Duration>maxWaitTime()Returns the maximum time to wait when acquiring objects.StringtoString()
-
-
-
Method Detail
-
maxWaitTime
public Optional<Duration> maxWaitTime()
Returns the maximum time to wait when acquiring objects.- Returns:
- An
Optionaldescribing the maximum time to wait when acquiring objects, orOptional#empty()to wait indefinitely.
-
maxIdleTime
public Optional<Duration> maxIdleTime()
Returns the maximum time that objects can be idle.- Returns:
- An
Optionaldescribing the maximum time that objects can be idle, orOptional.empty()if objects can be idle indefinitely.
-
initialSize
public int initialSize()
Returns the initial pool size. This is the number of idle objects to start with.- Returns:
- The initial pool size.
-
maxSize
public int maxSize()
Returns the maximum pool size. This is the maximum number of objects, both idle and currently in use.- Returns:
- The maximum pool size.
-
defaultConfig
public static PoolConfig defaultConfig()
Returns a defaultPoolConfigobject. This has the same configuration as an object returned bycustom().build().- Returns:
- A default
PoolConfigobject. - See Also:
custom()
-
custom
public static PoolConfig.Builder custom()
Returns a new builder for creatingPoolConfigobjects.- Returns:
- A new builder for creating
PoolConfigobjects.
-
-