Class BaseObjectPoolConfig<T>

  • Type Parameters:
    T - Type of element pooled.
    All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    GenericKeyedObjectPoolConfig, GenericObjectPoolConfig

    public abstract class BaseObjectPoolConfig<T>
    extends BaseObject
    implements java.lang.Cloneable
    Provides the implementation for the common attributes shared by the sub-classes. New instances of this class will be created using the defaults defined by the public constants.

    This class is not thread-safe.

    Since:
    2.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean getBlockWhenExhausted()
      Get the value for the blockWhenExhausted configuration attribute for pools created with this configuration instance.
      EvictionPolicy<T> getEvictionPolicy()
      Get the value for the evictionPolicyClass configuration attribute for pools created with this configuration instance.
      java.lang.String getEvictionPolicyClassName()
      Get the value for the evictionPolicyClassName configuration attribute for pools created with this configuration instance.
      long getEvictorShutdownTimeoutMillis()
      Get the value for the evictorShutdownTimeoutMillis configuration attribute for pools created with this configuration instance.
      boolean getFairness()
      Get the value for the fairness configuration attribute for pools created with this configuration instance.
      boolean getJmxEnabled()
      Gets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.
      java.lang.String getJmxNameBase()
      Gets the value of the JMX name base that will be used as part of the name assigned to JMX enabled pools created with this configuration instance.
      java.lang.String getJmxNamePrefix()
      Gets the value of the JMX name prefix that will be used as part of the name assigned to JMX enabled pools created with this configuration instance.
      boolean getLifo()
      Get the value for the lifo configuration attribute for pools created with this configuration instance.
      long getMaxWaitMillis()
      Get the value for the maxWait configuration attribute for pools created with this configuration instance.
      long getMinEvictableIdleTimeMillis()
      Get the value for the minEvictableIdleTimeMillis configuration attribute for pools created with this configuration instance.
      int getNumTestsPerEvictionRun()
      Get the value for the numTestsPerEvictionRun configuration attribute for pools created with this configuration instance.
      long getSoftMinEvictableIdleTimeMillis()
      Get the value for the softMinEvictableIdleTimeMillis configuration attribute for pools created with this configuration instance.
      boolean getTestOnBorrow()
      Get the value for the testOnBorrow configuration attribute for pools created with this configuration instance.
      boolean getTestOnCreate()
      Get the value for the testOnCreate configuration attribute for pools created with this configuration instance.
      boolean getTestOnReturn()
      Get the value for the testOnReturn configuration attribute for pools created with this configuration instance.
      boolean getTestWhileIdle()
      Get the value for the testWhileIdle configuration attribute for pools created with this configuration instance.
      long getTimeBetweenEvictionRunsMillis()
      Get the value for the timeBetweenEvictionRunsMillis configuration attribute for pools created with this configuration instance.
      void setBlockWhenExhausted​(boolean blockWhenExhausted)
      Set the value for the blockWhenExhausted configuration attribute for pools created with this configuration instance.
      void setEvictionPolicy​(EvictionPolicy<T> evictionPolicy)
      Set the value for the evictionPolicyClass configuration attribute for pools created with this configuration instance.
      void setEvictionPolicyClassName​(java.lang.String evictionPolicyClassName)
      Set the value for the evictionPolicyClassName configuration attribute for pools created with this configuration instance.
      void setEvictorShutdownTimeoutMillis​(long evictorShutdownTimeoutMillis)
      Set the value for the evictorShutdownTimeoutMillis configuration attribute for pools created with this configuration instance.
      void setFairness​(boolean fairness)
      Set the value for the fairness configuration attribute for pools created with this configuration instance.
      void setJmxEnabled​(boolean jmxEnabled)
      Sets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.
      void setJmxNameBase​(java.lang.String jmxNameBase)
      Sets the value of the JMX name base that will be used as part of the name assigned to JMX enabled pools created with this configuration instance.
      void setJmxNamePrefix​(java.lang.String jmxNamePrefix)
      Sets the value of the JMX name prefix that will be used as part of the name assigned to JMX enabled pools created with this configuration instance.
      void setLifo​(boolean lifo)
      Set the value for the lifo configuration attribute for pools created with this configuration instance.
      void setMaxWaitMillis​(long maxWaitMillis)
      Set the value for the maxWait configuration attribute for pools created with this configuration instance.
      void setMinEvictableIdleTimeMillis​(long minEvictableIdleTimeMillis)
      Set the value for the minEvictableIdleTimeMillis configuration attribute for pools created with this configuration instance.
      void setNumTestsPerEvictionRun​(int numTestsPerEvictionRun)
      Set the value for the numTestsPerEvictionRun configuration attribute for pools created with this configuration instance.
      void setSoftMinEvictableIdleTimeMillis​(long softMinEvictableIdleTimeMillis)
      Set the value for the softMinEvictableIdleTimeMillis configuration attribute for pools created with this configuration instance.
      void setTestOnBorrow​(boolean testOnBorrow)
      Set the value for the testOnBorrow configuration attribute for pools created with this configuration instance.
      void setTestOnCreate​(boolean testOnCreate)
      Set the value for the testOnCreate configuration attribute for pools created with this configuration instance.
      void setTestOnReturn​(boolean testOnReturn)
      Set the value for the testOnReturn configuration attribute for pools created with this configuration instance.
      void setTestWhileIdle​(boolean testWhileIdle)
      Set the value for the testWhileIdle configuration attribute for pools created with this configuration instance.
      void setTimeBetweenEvictionRunsMillis​(long timeBetweenEvictionRunsMillis)
      Set the value for the timeBetweenEvictionRunsMillis configuration attribute for pools created with this configuration instance.
      protected void toStringAppendFields​(java.lang.StringBuilder builder)
      Used by sub-classes to include the fields defined by the sub-class in the BaseObject.toString() output.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait