org.apache.ojb.broker.util.pooling
Class PoolConfiguration
java.lang.Object
java.util.Dictionary
java.util.Hashtable
java.util.Properties
org.apache.ojb.broker.util.pooling.PoolConfiguration
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Map, java.io.Serializable
- Direct Known Subclasses:
- ConnectionPoolDescriptor, PBPoolInfo
- public class PoolConfiguration
- extends java.util.Properties
- implements java.io.Serializable
Encapsulates configuration properties for
implementations using ObjectPool
.
- Version:
- $Id: PoolConfiguration.java,v 1.8 2004/02/11 19:35:25 arminw Exp $
- Author:
- Armin Waibel
- See Also:
- Serialized Form
Nested classes inherited from class java.util.Hashtable |
|
Fields inherited from class java.util.Properties |
defaults |
Methods inherited from class java.util.Properties |
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store |
Methods inherited from class java.util.Hashtable |
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
EMPTY
public static final java.lang.String EMPTY
- See Also:
- Constant Field Values
MAX_ACTIVE
public static final java.lang.String MAX_ACTIVE
- See Also:
- Constant Field Values
MAX_IDLE
public static final java.lang.String MAX_IDLE
- See Also:
- Constant Field Values
MAX_WAIT
public static final java.lang.String MAX_WAIT
- See Also:
- Constant Field Values
WHEN_EXHAUSTED_ACTION
public static final java.lang.String WHEN_EXHAUSTED_ACTION
- See Also:
- Constant Field Values
TEST_ON_BORROW
public static final java.lang.String TEST_ON_BORROW
- See Also:
- Constant Field Values
TEST_ON_RETURN
public static final java.lang.String TEST_ON_RETURN
- See Also:
- Constant Field Values
TEST_WHILE_IDLE
public static final java.lang.String TEST_WHILE_IDLE
- See Also:
- Constant Field Values
TIME_BETWEEN_EVICTION_RUNS_MILLIS
public static final java.lang.String TIME_BETWEEN_EVICTION_RUNS_MILLIS
- See Also:
- Constant Field Values
NUM_TESTS_PER_EVICTION_RUN
public static final java.lang.String NUM_TESTS_PER_EVICTION_RUN
- See Also:
- Constant Field Values
MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final java.lang.String MIN_EVICTABLE_IDLE_TIME_MILLIS
- See Also:
- Constant Field Values
LOG_ABANDONED
public static final java.lang.String LOG_ABANDONED
- See Also:
- Constant Field Values
REMOVE_ABANDONED
public static final java.lang.String REMOVE_ABANDONED
- See Also:
- Constant Field Values
REMOVE_ABANDONED_TIMEOUT
public static final java.lang.String REMOVE_ABANDONED_TIMEOUT
- See Also:
- Constant Field Values
VALIDATION_QUERY
public static final java.lang.String VALIDATION_QUERY
- See Also:
- Constant Field Values
DEFAULT_MAX_ACTIVE
public static final int DEFAULT_MAX_ACTIVE
- See Also:
- Constant Field Values
DEFAULT_MAX_IDLE
public static final int DEFAULT_MAX_IDLE
- See Also:
- Constant Field Values
DEFAULT_MAX_WAIT
public static final long DEFAULT_MAX_WAIT
- See Also:
- Constant Field Values
DEFAULT_WHEN_EXHAUSTED_ACTION
public static final byte DEFAULT_WHEN_EXHAUSTED_ACTION
- See Also:
- Constant Field Values
DEFAULT_TEST_ON_BORROW
public static final boolean DEFAULT_TEST_ON_BORROW
- See Also:
- Constant Field Values
DEFAULT_TEST_ON_RETURN
public static final boolean DEFAULT_TEST_ON_RETURN
- See Also:
- Constant Field Values
DEFAULT_TEST_WHILE_IDLE
public static final boolean DEFAULT_TEST_WHILE_IDLE
- See Also:
- Constant Field Values
DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
- See Also:
- Constant Field Values
DEFAULT_NUM_TESTS_PER_EVICTION_RUN
public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN
- See Also:
- Constant Field Values
DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
- See Also:
- Constant Field Values
DEFAULT_LOG_ABANDONED
public static final boolean DEFAULT_LOG_ABANDONED
- See Also:
- Constant Field Values
DEFAULT_REMOVE_ABANDONED
public static final boolean DEFAULT_REMOVE_ABANDONED
- See Also:
- Constant Field Values
DEFAULT_REMOVE_ABANDONED_TIMEOUT
public static final int DEFAULT_REMOVE_ABANDONED_TIMEOUT
- See Also:
- Constant Field Values
PoolConfiguration
public PoolConfiguration()
PoolConfiguration
public PoolConfiguration(java.util.Properties properties)
getObjectPoolConfig
public org.apache.commons.pool.impl.GenericObjectPool.Config getObjectPoolConfig()
- Returns an
GenericObjectPool.Config
object
configurated with the properties extracted from the this instance.
Use this to configurate a pool implementation using
GenericObjectPool
.
getKeyedObjectPoolConfig
public org.apache.commons.pool.impl.GenericKeyedObjectPool.Config getKeyedObjectPoolConfig()
- Returns an
GenericKeyedObjectPool.Config
object
configurated with the properties extracted from the this instance.
Use this to configurate a pool implementation using
GenericKeyedObjectPool
.
getAbandonedConfig
public org.apache.commons.dbcp.AbandonedConfig getAbandonedConfig()
isLogAbandoned
public boolean isLogAbandoned()
setLogAbandoned
public void setLogAbandoned(boolean logAbandoned)
isRemoveAbandoned
public boolean isRemoveAbandoned()
setRemoveAbandoned
public void setRemoveAbandoned(boolean removeAbandoned)
getRemoveAbandonedTimeout
public int getRemoveAbandonedTimeout()
setRemoveAbandonedTimeout
public void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
getValidationQuery
public java.lang.String getValidationQuery()
setValidationQuery
public void setValidationQuery(java.lang.String validationQuery)
getMaxActive
public int getMaxActive()
setMaxActive
public void setMaxActive(int maxActive)
getMaxIdle
public int getMaxIdle()
setMaxIdle
public void setMaxIdle(int maxIdle)
getMaxWait
public long getMaxWait()
setMaxWait
public void setMaxWait(long maxWait)
getWhenExhaustedAction
public byte getWhenExhaustedAction()
setWhenExhaustedAction
public void setWhenExhaustedAction(byte whenExhaustedAction)
isTestOnBorrow
public boolean isTestOnBorrow()
setTestOnBorrow
public void setTestOnBorrow(boolean testOnBorrow)
isTestOnReturn
public boolean isTestOnReturn()
setTestOnReturn
public void setTestOnReturn(boolean testOnReturn)
isTestWhileIdle
public boolean isTestWhileIdle()
setTestWhileIdle
public void setTestWhileIdle(boolean testWhileIdle)
getMinEvictableIdleTimeMillis
public long getMinEvictableIdleTimeMillis()
setMinEvictableIdleTimeMillis
public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
getTimeBetweenEvictionRunsMillis
public long getTimeBetweenEvictionRunsMillis()
setTimeBetweenEvictionRunsMillis
public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
getNumTestsPerEvictionRun
public int getNumTestsPerEvictionRun()
setNumTestsPerEvictionRun
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14