java.lang.Object
io.lettuce.core.support.BasePoolConfig.Builder
- Direct Known Subclasses:
BoundedPoolConfig.Builder
- Enclosing class:
- BasePoolConfig
public abstract static class BasePoolConfig.Builder extends Object
Builder for
BasePoolConfig.-
Field Summary
Fields Modifier and Type Field Description protected booleantestOnAcquireprotected booleantestOnCreateprotected booleantestOnRelease -
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder() -
Method Summary
Modifier and Type Method Description BasePoolConfig.BuildertestOnAcquire()Enables validation of objects before being returned from the acquire method.BasePoolConfig.BuildertestOnAcquire(boolean testOnAcquire)Configures whether objects acquired from the pool will be validated before being returned from the acquire method.BasePoolConfig.BuildertestOnCreate()Enables validation of objects before being returned from the acquire method.BasePoolConfig.BuildertestOnCreate(boolean testOnCreate)Configures whether objects created for the pool will be validated before being returned from the acquire method.BasePoolConfig.BuildertestOnRelease()Enables validation of objects when they are returned to the pool via the release method.BasePoolConfig.BuildertestOnRelease(boolean testOnRelease)Configures whether objects borrowed from the pool will be validated when they are returned to the pool via the release method.
-
Field Details
-
testOnCreate
protected boolean testOnCreate -
testOnAcquire
protected boolean testOnAcquire -
testOnRelease
protected boolean testOnRelease
-
-
Constructor Details
-
Builder
protected Builder()
-
-
Method Details
-
testOnCreate
Enables validation of objects before being returned from the acquire method. Validation is performed by theAsyncObjectFactory.validate(Object)method of the factory associated with the pool. If the object fails to validate, then acquire will fail.- Returns:
thisBasePoolConfig.Builder.
-
testOnCreate
Configures whether objects created for the pool will be validated before being returned from the acquire method. Validation is performed by theAsyncObjectFactory.validate(Object)method of the factory associated with the pool. If the object fails to validate, then acquire will fail.- Parameters:
testOnCreate-trueif newly created objects should be validated before being returned from the acquire method.trueto enable test on creation.- Returns:
thisBasePoolConfig.Builder.
-
testOnAcquire
Enables validation of objects before being returned from the acquire method. Validation is performed by theAsyncObjectFactory.validate(Object)method of the factory associated with the pool. If the object fails to validate, it will be removed from the pool and destroyed, and a new attempt will be made to borrow an object from the pool.- Returns:
thisBasePoolConfig.Builder.
-
testOnAcquire
Configures whether objects acquired from the pool will be validated before being returned from the acquire method. Validation is performed by theAsyncObjectFactory.validate(Object)method of the factory associated with the pool. If the object fails to validate, it will be removed from the pool and destroyed, and a new attempt will be made to borrow an object from the pool.- Parameters:
testOnAcquire-trueif objects should be validated before being returned from the acquire method.- Returns:
thisBasePoolConfig.Builder.
-
testOnRelease
Enables validation of objects when they are returned to the pool via the release method. Validation is performed by theAsyncObjectFactory.validate(Object)method of the factory associated with the pool. Returning objects that fail validation are destroyed rather then being returned the pool.- Returns:
thisBasePoolConfig.Builder.
-
testOnRelease
Configures whether objects borrowed from the pool will be validated when they are returned to the pool via the release method. Validation is performed by theAsyncObjectFactory.validate(Object)method of the factory associated with the pool. Returning objects that fail validation are destroyed rather then being returned the pool.- Parameters:
testOnRelease-trueif objects should be validated on return to the pool via the release method.- Returns:
thisBasePoolConfig.Builder.
-