Class BasePoolConfig.Builder

    • Field Detail

      • testOnCreate

        protected boolean testOnCreate
      • testOnAcquire

        protected boolean testOnAcquire
      • testOnRelease

        protected boolean testOnRelease
    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • testOnCreate

        public BasePoolConfig.Builder testOnCreate​(boolean testOnCreate)
        Configures whether objects created for the pool will be validated before being returned from the acquire method. Validation is performed by the AsyncObjectFactory.validate(Object) method of the factory associated with the pool. If the object fails to validate, then acquire will fail.
        Parameters:
        testOnCreate - true if newly created objects should be validated before being returned from the acquire method. true to enable test on creation.
        Returns:
        this BasePoolConfig.Builder.
      • testOnAcquire

        public BasePoolConfig.Builder testOnAcquire()
        Enables validation of objects before being returned from the acquire method. Validation is performed by the AsyncObjectFactory.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:
        this BasePoolConfig.Builder.
      • testOnAcquire

        public BasePoolConfig.Builder testOnAcquire​(boolean testOnAcquire)
        Configures whether objects acquired from the pool will be validated before being returned from the acquire method. Validation is performed by the AsyncObjectFactory.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 - true if objects should be validated before being returned from the acquire method.
        Returns:
        this BasePoolConfig.Builder.
      • testOnRelease

        public BasePoolConfig.Builder testOnRelease()
        Enables validation of objects when they are returned to the pool via the release method. Validation is performed by the AsyncObjectFactory.validate(Object) method of the factory associated with the pool. Returning objects that fail validation are destroyed rather then being returned the pool.
        Returns:
        this BasePoolConfig.Builder.
      • testOnRelease

        public BasePoolConfig.Builder testOnRelease​(boolean 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 the AsyncObjectFactory.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 - true if objects should be validated on return to the pool via the release method.
        Returns:
        this BasePoolConfig.Builder.