Class PoolConfig


  • public class PoolConfig
    extends AbstractConfig
    Contains all the configuration data that the pooling implementations need to control the pool.
    • Field Detail

      • DEFAULT_MIN_POOL_SIZE

        public static final int DEFAULT_MIN_POOL_SIZE
        Default min pool size, value is 3.
        See Also:
        Constant Field Values
      • DEFAULT_MAX_POOL_SIZE

        public static final int DEFAULT_MAX_POOL_SIZE
        Default max pool size, value is 10.
        See Also:
        Constant Field Values
      • DEFAULT_VALIDATE_ON_CHECKIN

        public static final boolean DEFAULT_VALIDATE_ON_CHECKIN
        Default validate on check in, value is false.
        See Also:
        Constant Field Values
      • DEFAULT_VALIDATE_ON_CHECKOUT

        public static final boolean DEFAULT_VALIDATE_ON_CHECKOUT
        Default validate on check out, value is false.
        See Also:
        Constant Field Values
      • DEFAULT_VALIDATE_PERIODICALLY

        public static final boolean DEFAULT_VALIDATE_PERIODICALLY
        Default validate periodically, value is false.
        See Also:
        Constant Field Values
      • minPoolSize

        private int minPoolSize
        Minimum pool size.
      • maxPoolSize

        private int maxPoolSize
        Maximum pool size.
      • validateOnCheckIn

        private boolean validateOnCheckIn
        Whether the ldap object should be validated when returned to the pool.
      • validateOnCheckOut

        private boolean validateOnCheckOut
        Whether the ldap object should be validated when given from the pool.
      • validatePeriodically

        private boolean validatePeriodically
        Whether the pool should be validated periodically.
    • Constructor Detail

      • PoolConfig

        public PoolConfig()
    • Method Detail

      • getMinPoolSize

        public int getMinPoolSize()
        Returns the min pool size. Default value is DEFAULT_MIN_POOL_SIZE. This value represents the size of the pool after a prune has occurred.
        Returns:
        min pool size
      • setMinPoolSize

        public void setMinPoolSize​(int size)
        Sets the min pool size.
        Parameters:
        size - min pool size
      • getMaxPoolSize

        public int getMaxPoolSize()
        Returns the max pool size. Default value is DEFAULT_MAX_POOL_SIZE. This value may or may not be strictly enforced depending on the pooling implementation.
        Returns:
        max pool size
      • setMaxPoolSize

        public void setMaxPoolSize​(int size)
        Sets the max pool size.
        Parameters:
        size - max pool size
      • isValidateOnCheckIn

        public boolean isValidateOnCheckIn()
        Returns the validate on check in flag. Default value is DEFAULT_VALIDATE_ON_CHECKIN.
        Returns:
        validate on check in
      • setValidateOnCheckIn

        public void setValidateOnCheckIn​(boolean b)
        Sets the validate on check in flag.
        Parameters:
        b - validate on check in
      • isValidateOnCheckOut

        public boolean isValidateOnCheckOut()
        Returns the validate on check out flag. Default value is DEFAULT_VALIDATE_ON_CHECKOUT.
        Returns:
        validate on check in
      • setValidateOnCheckOut

        public void setValidateOnCheckOut​(boolean b)
        Sets the validate on check out flag.
        Parameters:
        b - validate on check out
      • isValidatePeriodically

        public boolean isValidatePeriodically()
        Returns the validate periodically flag. Default value is DEFAULT_VALIDATE_PERIODICALLY.
        Returns:
        validate periodically
      • setValidatePeriodically

        public void setValidatePeriodically​(boolean b)
        Sets the validate periodically flag.
        Parameters:
        b - validate periodically
      • builder

        public static PoolConfig.Builder builder()
        Creates a builder for this class.
        Returns:
        new builder