Modifier and Type | Class and Description |
---|---|
static class |
PoolConfig.Builder
A builder for
PoolConfig objects. |
Modifier and Type | Method and Description |
---|---|
static PoolConfig.Builder |
custom()
Returns a new builder for creating
PoolConfig objects. |
static PoolConfig |
defaultConfig()
Returns a default
PoolConfig object. |
int |
initialSize()
Returns the initial pool size.
|
Optional<Duration> |
maxIdleTime()
Returns the maximum time that objects can be idle.
|
int |
maxSize()
Returns the maximum pool size.
|
Optional<Duration> |
maxWaitTime()
Returns the maximum time to wait when acquiring objects.
|
String |
toString() |
public Optional<Duration> maxWaitTime()
Optional
describing the maximum time to wait when acquiring objects, or Optional#empty()
to wait indefinitely.public Optional<Duration> maxIdleTime()
Optional
describing the maximum time that objects can be idle,
or Optional.empty()
if objects can be idle indefinitely.public int initialSize()
public int maxSize()
public static PoolConfig defaultConfig()
PoolConfig
object. This has the same configuration as an object returned by custom().build()
.PoolConfig
object.custom()
public static PoolConfig.Builder custom()
PoolConfig
objects.PoolConfig
objects.Copyright © 2022. All rights reserved.