org.apache.commons.pool2.impl
Class GenericObjectPoolConfig

java.lang.Object
  extended by org.apache.commons.pool2.impl.BaseObjectPoolConfig
      extended by org.apache.commons.pool2.impl.GenericObjectPoolConfig
All Implemented Interfaces:
Cloneable

public class GenericObjectPoolConfig
extends BaseObjectPoolConfig

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
Version:
$Revision: $

Field Summary
static int DEFAULT_MAX_IDLE
          The default value for the maxIdle configuration attribute.
static int DEFAULT_MAX_TOTAL
          The default value for the maxTotal configuration attribute.
static int DEFAULT_MIN_IDLE
          The default value for the minIdle configuration attribute.
 
Fields inherited from class org.apache.commons.pool2.impl.BaseObjectPoolConfig
DEFAULT_BLOCK_WHEN_EXHAUSTED, DEFAULT_EVICTION_POLICY_CLASS_NAME, DEFAULT_JMX_ENABLE, DEFAULT_JMX_NAME_PREFIX, DEFAULT_LIFO, DEFAULT_MAX_WAIT_MILLIS, DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_NUM_TESTS_PER_EVICTION_RUN, DEFAULT_SOFT_MIN_EVICTABLE_IDLE_TIME_MILLIS, DEFAULT_TEST_ON_BORROW, DEFAULT_TEST_ON_RETURN, DEFAULT_TEST_WHILE_IDLE, DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
 
Constructor Summary
GenericObjectPoolConfig()
           
 
Method Summary
 GenericObjectPoolConfig clone()
           
 int getMaxIdle()
          Get the value for the maxIdle configuration attribute for pools created with this configuration instance.
 int getMaxTotal()
          Get the value for the maxTotal configuration attribute for pools created with this configuration instance.
 int getMinIdle()
          Get the value for the minIdle configuration attribute for pools created with this configuration instance.
 void setMaxIdle(int maxIdle)
          Set the value for the maxIdle configuration attribute for pools created with this configuration instance.
 void setMaxTotal(int maxTotal)
          Set the value for the maxTotal configuration attribute for pools created with this configuration instance.
 void setMinIdle(int minIdle)
          Set the value for the minIdle configuration attribute for pools created with this configuration instance.
 
Methods inherited from class org.apache.commons.pool2.impl.BaseObjectPoolConfig
getBlockWhenExhausted, getEvictionPolicyClassName, getJmxEnabled, getJmxNamePrefix, getLifo, getMaxWaitMillis, getMinEvictableIdleTimeMillis, getNumTestsPerEvictionRun, getSoftMinEvictableIdleTimeMillis, getTestOnBorrow, getTestOnReturn, getTestWhileIdle, getTimeBetweenEvictionRunsMillis, setBlockWhenExhausted, setEvictionPolicyClassName, setJmxEnabled, setJmxNamePrefix, setLifo, setMaxWaitMillis, setMinEvictableIdleTimeMillis, setNumTestsPerEvictionRun, setSoftMinEvictableIdleTimeMillis, setTestOnBorrow, setTestOnReturn, setTestWhileIdle, setTimeBetweenEvictionRunsMillis
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_TOTAL

public static final int DEFAULT_MAX_TOTAL
The default value for the maxTotal configuration attribute.

See Also:
BaseGenericObjectPool.getMaxTotal(), Constant Field Values

DEFAULT_MAX_IDLE

public static final int DEFAULT_MAX_IDLE
The default value for the maxIdle configuration attribute.

See Also:
GenericObjectPool.getMaxIdle(), Constant Field Values

DEFAULT_MIN_IDLE

public static final int DEFAULT_MIN_IDLE
The default value for the minIdle configuration attribute.

See Also:
GenericObjectPool.getMinIdle(), Constant Field Values
Constructor Detail

GenericObjectPoolConfig

public GenericObjectPoolConfig()
Method Detail

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()

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)

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()

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)

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()

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)

clone

public GenericObjectPoolConfig clone()
Overrides:
clone in class Object


Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.