java.lang.Object
io.lettuce.core.support.BasePoolConfig
- Direct Known Subclasses:
BoundedPoolConfig
public abstract class BasePoolConfig extends Object
Base configuration for an object pool declaring options for object validation. Typically used as base class for configuration
objects for specific pool implementations.
- Since:
- 5.1
- Author:
- Mark Paluch
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBasePoolConfig.BuilderBuilder forBasePoolConfig. -
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_TEST_ON_ACQUIREThe default value for thetestOnAcquireconfiguration attribute.static booleanDEFAULT_TEST_ON_CREATEThe default value for thetestOnCreateconfiguration attribute.static booleanDEFAULT_TEST_ON_RELEASEThe default value for thetestOnReleaseconfiguration attribute. -
Constructor Summary
Constructors Modifier Constructor Description protectedBasePoolConfig(boolean testOnCreate, boolean testOnAcquire, boolean testOnRelease) -
Method Summary
Modifier and Type Method Description booleanisTestOnAcquire()Get the value for thetestOnAcquireconfiguration attribute for pools created with this configuration instance.booleanisTestOnCreate()Get the value for thetestOnCreateconfiguration attribute for pools created with this configuration instance.booleanisTestOnRelease()Get the value for thetestOnReleaseconfiguration attribute for pools created with this configuration instance.
-
Field Details
-
DEFAULT_TEST_ON_CREATE
public static final boolean DEFAULT_TEST_ON_CREATEThe default value for thetestOnCreateconfiguration attribute.- See Also:
- Constant Field Values
-
DEFAULT_TEST_ON_ACQUIRE
public static final boolean DEFAULT_TEST_ON_ACQUIREThe default value for thetestOnAcquireconfiguration attribute.- See Also:
- Constant Field Values
-
DEFAULT_TEST_ON_RELEASE
public static final boolean DEFAULT_TEST_ON_RELEASEThe default value for thetestOnReleaseconfiguration attribute.- See Also:
- Constant Field Values
-
-
Constructor Details
-
BasePoolConfig
protected BasePoolConfig(boolean testOnCreate, boolean testOnAcquire, boolean testOnRelease)
-
-
Method Details
-
isTestOnCreate
public boolean isTestOnCreate()Get the value for thetestOnCreateconfiguration attribute for pools created with this configuration instance.- Returns:
- the current setting of
testOnCreatefor this configuration instance.
-
isTestOnAcquire
public boolean isTestOnAcquire()Get the value for thetestOnAcquireconfiguration attribute for pools created with this configuration instance.- Returns:
- the current setting of
testOnAcquirefor this configuration instance.
-
isTestOnRelease
public boolean isTestOnRelease()Get the value for thetestOnReleaseconfiguration attribute for pools created with this configuration instance.- Returns:
- the current setting of
testOnReleasefor this configuration instance.
-