java.lang.Object
io.lettuce.core.support.BasePoolConfig
io.lettuce.core.support.BoundedPoolConfig
public class BoundedPoolConfig extends BasePoolConfig
Configuration for asynchronous pooling using
BoundedAsyncPool. Instances can be created through a builder().- Since:
- 5.1
- Author:
- Mark Paluch
- See Also:
BoundedAsyncPool
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBoundedPoolConfig.BuilderBuilder forBoundedPoolConfig. -
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_MAX_IDLEThe default value for themaxIdleconfiguration attribute.static intDEFAULT_MAX_TOTALThe default value for themaxTotalconfiguration attribute.static intDEFAULT_MIN_IDLEThe default value for theminIdleconfiguration 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 protectedBoundedPoolConfig(boolean testOnCreate, boolean testOnAcquire, boolean testOnRelease, int maxTotal, int maxIdle, int minIdle) -
Method Summary
Modifier and Type Method Description static BoundedPoolConfig.Builderbuilder()Create a newBoundedPoolConfig.BuilderforBoundedPoolConfig.static BoundedPoolConfigcreate()intgetMaxIdle()Get the value for themaxIdleconfiguration attribute for pools created with this configuration instance.intgetMaxTotal()Get the value for themaxTotalconfiguration attribute for pools created with this configuration instance.intgetMinIdle()Get the value for theminIdleconfiguration attribute for pools created with this configuration instance.Methods inherited from class io.lettuce.core.support.BasePoolConfig
isTestOnAcquire, isTestOnCreate, isTestOnRelease
-
Field Details
-
DEFAULT_MAX_TOTAL
public static final int DEFAULT_MAX_TOTALThe default value for themaxTotalconfiguration attribute.- See Also:
- Constant Field Values
-
DEFAULT_MAX_IDLE
public static final int DEFAULT_MAX_IDLEThe default value for themaxIdleconfiguration attribute.- See Also:
- Constant Field Values
-
DEFAULT_MIN_IDLE
public static final int DEFAULT_MIN_IDLEThe default value for theminIdleconfiguration attribute.- See Also:
- Constant Field Values
-
-
Constructor Details
-
BoundedPoolConfig
protected BoundedPoolConfig(boolean testOnCreate, boolean testOnAcquire, boolean testOnRelease, int maxTotal, int maxIdle, int minIdle)
-
-
Method Details
-
builder
Create a newBoundedPoolConfig.BuilderforBoundedPoolConfig.- Returns:
- a new
BoundedPoolConfig.BuilderforBoundedPoolConfig.
-
create
-
getMaxTotal
public int getMaxTotal()Get the value for themaxTotalconfiguration attribute for pools created with this configuration instance.- Returns:
- the current setting of
maxTotalfor this configuration instance.
-
getMaxIdle
public int getMaxIdle()Get the value for themaxIdleconfiguration attribute for pools created with this configuration instance.- Returns:
- the current setting of
maxIdlefor this configuration instance.
-
getMinIdle
public int getMinIdle()Get the value for theminIdleconfiguration attribute for pools created with this configuration instance.- Returns:
- the current setting of
minIdlefor this configuration instance.
-