Package io.lettuce.core.support
Class BoundedPoolConfig
- java.lang.Object
-
- io.lettuce.core.support.BasePoolConfig
-
- io.lettuce.core.support.BoundedPoolConfig
-
public class BoundedPoolConfig extends BasePoolConfig
Configuration for asynchronous pooling usingBoundedAsyncPool
. Instances can be created through abuilder()
.- Since:
- 5.1
- Author:
- Mark Paluch
- See Also:
BoundedAsyncPool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BoundedPoolConfig.Builder
Builder forBoundedPoolConfig
.
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_MAX_IDLE
The default value for themaxIdle
configuration attribute.static int
DEFAULT_MAX_TOTAL
The default value for themaxTotal
configuration attribute.static int
DEFAULT_MIN_IDLE
The default value for theminIdle
configuration attribute.-
Fields inherited from class io.lettuce.core.support.BasePoolConfig
DEFAULT_TEST_ON_ACQUIRE, DEFAULT_TEST_ON_CREATE, DEFAULT_TEST_ON_RELEASE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BoundedPoolConfig(boolean testOnCreate, boolean testOnAcquire, boolean testOnRelease, int maxTotal, int maxIdle, int minIdle)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static BoundedPoolConfig.Builder
builder()
Create a newBoundedPoolConfig.Builder
forBoundedPoolConfig
.static BoundedPoolConfig
create()
int
getMaxIdle()
Get the value for themaxIdle
configuration attribute for pools created with this configuration instance.int
getMaxTotal()
Get the value for themaxTotal
configuration attribute for pools created with this configuration instance.int
getMinIdle()
Get the value for theminIdle
configuration attribute for pools created with this configuration instance.-
Methods inherited from class io.lettuce.core.support.BasePoolConfig
isTestOnAcquire, isTestOnCreate, isTestOnRelease
-
-
-
-
Field Detail
-
DEFAULT_MAX_TOTAL
public static final int DEFAULT_MAX_TOTAL
The default value for themaxTotal
configuration attribute.- See Also:
- Constant Field Values
-
DEFAULT_MAX_IDLE
public static final int DEFAULT_MAX_IDLE
The default value for themaxIdle
configuration attribute.- See Also:
- Constant Field Values
-
DEFAULT_MIN_IDLE
public static final int DEFAULT_MIN_IDLE
The default value for theminIdle
configuration attribute.- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static BoundedPoolConfig.Builder builder()
Create a newBoundedPoolConfig.Builder
forBoundedPoolConfig
.- Returns:
- a new
BoundedPoolConfig.Builder
forBoundedPoolConfig
.
-
create
public static BoundedPoolConfig create()
-
getMaxTotal
public int getMaxTotal()
Get the value for themaxTotal
configuration attribute for pools created with this configuration instance.- Returns:
- the current setting of
maxTotal
for this configuration instance.
-
getMaxIdle
public int getMaxIdle()
Get the value for themaxIdle
configuration attribute for pools created with this configuration instance.- Returns:
- the current setting of
maxIdle
for this configuration instance.
-
getMinIdle
public int getMinIdle()
Get the value for theminIdle
configuration attribute for pools created with this configuration instance.- Returns:
- the current setting of
minIdle
for this configuration instance.
-
-