Class BaseObjectPoolConfig<T>

java.lang.Object
org.apache.tomcat.dbcp.pool2.BaseObject
org.apache.tomcat.dbcp.pool2.impl.BaseObjectPoolConfig<T>
Type Parameters:
T - Type of element pooled.
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
GenericKeyedObjectPoolConfig, GenericObjectPoolConfig

public abstract class BaseObjectPoolConfig<T> extends BaseObject implements 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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    The default value for the blockWhenExhausted configuration attribute.
    static final String
    The default value for the evictionPolicyClassName configuration attribute.
    static final long
    The default value for evictorShutdownTimeoutMillis configuration attribute.
    static final boolean
    The default value for the fairness configuration attribute.
    static final boolean
    The default value for enabling JMX for pools created with a configuration instance.
    static final String
    The default value for the base name to use to name JMX enabled pools created with a configuration instance.
    static final String
    The default value for the prefix used to name JMX enabled pools created with a configuration instance.
    static final boolean
    The default value for the lifo configuration attribute.
    static final long
    The default value for the maxWait configuration attribute.
    static final long
    The default value for the minEvictableIdleTimeMillis configuration attribute.
    static final int
    The default value for the numTestsPerEvictionRun configuration attribute.
    static final long
    The default value for the softMinEvictableIdleTimeMillis configuration attribute.
    static final boolean
    The default value for the testOnBorrow configuration attribute.
    static final boolean
    The default value for the testOnCreate configuration attribute.
    static final boolean
    The default value for the testOnReturn configuration attribute.
    static final boolean
    The default value for the testWhileIdle configuration attribute.
    static final long
    The default value for the timeBetweenEvictionRunsMillis configuration attribute.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Get the value for the blockWhenExhausted configuration attribute for pools created with this configuration instance.
    Get the value for the evictionPolicyClass configuration attribute for pools created with this configuration instance.
    Get the value for the evictionPolicyClassName configuration attribute for pools created with this configuration instance.
    long
    Get the value for the evictorShutdownTimeoutMillis configuration attribute for pools created with this configuration instance.
    boolean
    Get the value for the fairness configuration attribute for pools created with this configuration instance.
    boolean
    Gets the value of the flag that determines if JMX will be enabled for pools created with this configuration instance.
    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.
    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
    Get the value for the lifo configuration attribute for pools created with this configuration instance.
    long
    Get the value for the maxWait configuration attribute for pools created with this configuration instance.
    long
    Get the value for the minEvictableIdleTimeMillis configuration attribute for pools created with this configuration instance.
    int
    Get the value for the numTestsPerEvictionRun configuration attribute for pools created with this configuration instance.
    long
    Get the value for the softMinEvictableIdleTimeMillis configuration attribute for pools created with this configuration instance.
    boolean
    Get the value for the testOnBorrow configuration attribute for pools created with this configuration instance.
    boolean
    Get the value for the testOnCreate configuration attribute for pools created with this configuration instance.
    boolean
    Get the value for the testOnReturn configuration attribute for pools created with this configuration instance.
    boolean
    Get the value for the testWhileIdle configuration attribute for pools created with this configuration instance.
    long
    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
    Set the value for the evictionPolicyClass configuration attribute for pools created with this configuration instance.
    void
    setEvictionPolicyClassName(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(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(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
    Used by sub-classes to include the fields defined by the sub-class in the BaseObject.toString() output.

    Methods inherited from class org.apache.tomcat.dbcp.pool2.BaseObject

    toString

    Methods inherited from class java.lang.Object

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