Class GenericObjectPoolConfig<T>

  • Type Parameters:
    T - Type of element pooled.
    All Implemented Interfaces:
    java.lang.Cloneable

    public class GenericObjectPoolConfig<T>
    extends BaseObjectPoolConfig<T>
    A simple "struct" encapsulating the configuration for a GenericObjectPool.

    This class is not thread-safe; it is only intended to be used to provide attributes used when creating a pool.

    Since:
    2.0
    • Constructor Detail

      • GenericObjectPoolConfig

        public GenericObjectPoolConfig()
    • Method Detail

      • getMaxIdle

        public int getMaxIdle()
        Get the value for the maxIdle configuration attribute for pools created with this configuration instance.
        Returns:
        The current setting of maxIdle for this configuration instance
        See Also:
        GenericObjectPool.getMaxIdle()
      • getMaxTotal

        public int getMaxTotal()
        Get the value for the maxTotal configuration attribute for pools created with this configuration instance.
        Returns:
        The current setting of maxTotal for this configuration instance
        See Also:
        BaseGenericObjectPool.getMaxTotal()
      • getMinIdle

        public int getMinIdle()
        Get the value for the minIdle configuration attribute for pools created with this configuration instance.
        Returns:
        The current setting of minIdle for this configuration instance
        See Also:
        GenericObjectPool.getMinIdle()
      • setMaxIdle

        public void setMaxIdle​(int maxIdle)
        Set the value for the maxIdle configuration attribute for pools created with this configuration instance.
        Parameters:
        maxIdle - The new setting of maxIdle for this configuration instance
        See Also:
        GenericObjectPool.setMaxIdle(int)
      • setMaxTotal

        public void setMaxTotal​(int maxTotal)
        Set the value for the maxTotal configuration attribute for pools created with this configuration instance.
        Parameters:
        maxTotal - The new setting of maxTotal for this configuration instance
        See Also:
        BaseGenericObjectPool.setMaxTotal(int)
      • setMinIdle

        public void setMinIdle​(int minIdle)
        Set the value for the minIdle configuration attribute for pools created with this configuration instance.
        Parameters:
        minIdle - The new setting of minIdle for this configuration instance
        See Also:
        GenericObjectPool.setMinIdle(int)
      • toStringAppendFields

        protected void toStringAppendFields​(java.lang.StringBuilder builder)
        Description copied from class: BaseObject
        Used by sub-classes to include the fields defined by the sub-class in the BaseObject.toString() output.
        Overrides:
        toStringAppendFields in class BaseObjectPoolConfig<T>
        Parameters:
        builder - Field names and values are appended to this object