|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary<K,V>
java.util.Hashtable<Object,Object>
java.util.Properties
org.apache.ojb.broker.util.pooling.PoolConfiguration
public class PoolConfiguration
Encapsulates configuration properties for
implementations using ObjectPool.
| Fields inherited from class java.util.Properties |
|---|
defaults |
| Constructor Summary | |
|---|---|
PoolConfiguration()
|
|
PoolConfiguration(Properties properties)
|
|
| Method Summary | |
|---|---|
void |
addAttribute(String attributeName,
String attributeValue)
Store the specified attribute and it's value. |
org.apache.commons.dbcp.AbandonedConfig |
getAbandonedConfig()
|
String |
getAttribute(String key)
Get the value of an attribute |
String |
getAttribute(String attributeName,
String defaultValue)
Get the value of an attribute |
org.apache.commons.pool.impl.GenericKeyedObjectPool.Config |
getKeyedObjectPoolConfig()
Returns an GenericKeyedObjectPool.Config object
configurated with the properties extracted from the this instance. |
int |
getMaxActive()
|
int |
getMaxIdle()
|
long |
getMaxWait()
|
long |
getMinEvictableIdleTimeMillis()
|
int |
getMinIdle()
|
int |
getNumTestsPerEvictionRun()
|
org.apache.commons.pool.impl.GenericObjectPool.Config |
getObjectPoolConfig()
Returns an GenericObjectPool.Config object
configurated with the properties extracted from the this instance. |
int |
getRemoveAbandonedTimeout()
|
long |
getTimeBetweenEvictionRunsMillis()
|
String |
getValidationQuery()
|
byte |
getWhenExhaustedAction()
|
boolean |
isLogAbandoned()
|
boolean |
isRemoveAbandoned()
|
boolean |
isTestOnBorrow()
|
boolean |
isTestOnReturn()
|
boolean |
isTestWhileIdle()
|
void |
setLogAbandoned(boolean logAbandoned)
|
void |
setMaxActive(int maxActive)
|
void |
setMaxIdle(int maxIdle)
|
void |
setMaxWait(long maxWait)
|
void |
setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
|
void |
setMinIdle(int minIdle)
|
void |
setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
|
void |
setRemoveAbandoned(boolean removeAbandoned)
|
void |
setRemoveAbandonedTimeout(int removeAbandonedTimeout)
|
void |
setTestOnBorrow(boolean testOnBorrow)
|
void |
setTestOnReturn(boolean testOnReturn)
|
void |
setTestWhileIdle(boolean testWhileIdle)
|
void |
setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
|
void |
setValidationQuery(String validationQuery)
|
void |
setWhenExhaustedAction(byte whenExhaustedAction)
|
| Methods inherited from class java.util.Properties |
|---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| 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 |
| Field Detail |
|---|
public static final String MAX_ACTIVE
public static final String MAX_IDLE
public static final String MIN_IDLE
public static final String MAX_WAIT
public static final String WHEN_EXHAUSTED_ACTION
public static final String TEST_ON_BORROW
public static final String TEST_ON_RETURN
public static final String TEST_WHILE_IDLE
public static final String TIME_BETWEEN_EVICTION_RUNS_MILLIS
public static final String NUM_TESTS_PER_EVICTION_RUN
public static final String MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final String LOG_ABANDONED
public static final String REMOVE_ABANDONED
public static final String REMOVE_ABANDONED_TIMEOUT
public static final String VALIDATION_QUERY
public static final int DEFAULT_MAX_ACTIVE
public static final int DEFAULT_MAX_IDLE
public static final int DEFAULT_MIN_IDLE
public static final long DEFAULT_MAX_WAIT
public static final byte DEFAULT_WHEN_EXHAUSTED_ACTION
public static final boolean DEFAULT_TEST_ON_BORROW
public static final boolean DEFAULT_TEST_ON_RETURN
public static final boolean DEFAULT_TEST_WHILE_IDLE
public static final long DEFAULT_TIME_BETWEEN_EVICTION_RUNS_MILLIS
public static final int DEFAULT_NUM_TESTS_PER_EVICTION_RUN
public static final long DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS
public static final boolean DEFAULT_LOG_ABANDONED
public static final boolean DEFAULT_REMOVE_ABANDONED
public static final int DEFAULT_REMOVE_ABANDONED_TIMEOUT
| Constructor Detail |
|---|
public PoolConfiguration()
public PoolConfiguration(Properties properties)
| Method Detail |
|---|
public org.apache.commons.pool.impl.GenericObjectPool.Config getObjectPoolConfig()
GenericObjectPool.Config object
configurated with the properties extracted from the this instance.
Use this to configurate a pool implementation using
GenericObjectPool.
public org.apache.commons.pool.impl.GenericKeyedObjectPool.Config getKeyedObjectPoolConfig()
GenericKeyedObjectPool.Config object
configurated with the properties extracted from the this instance.
Use this to configurate a pool implementation using
GenericKeyedObjectPool.
public org.apache.commons.dbcp.AbandonedConfig getAbandonedConfig()
public void addAttribute(String attributeName,
String attributeValue)
AttributeContainer
addAttribute in interface AttributeContainerattributeName - the name of the attribute to retrieveattributeValue - the attribute's valuepublic String getAttribute(String key)
AttributeContainer
getAttribute in interface AttributeContainerkey - the attribute to retrieve
public String getAttribute(String attributeName,
String defaultValue)
AttributeContainer
getAttribute in interface AttributeContainerattributeName - the attribute to retrievedefaultValue - the value to return if the attribute is not present
public boolean isLogAbandoned()
public void setLogAbandoned(boolean logAbandoned)
public boolean isRemoveAbandoned()
public void setRemoveAbandoned(boolean removeAbandoned)
public int getRemoveAbandonedTimeout()
public void setRemoveAbandonedTimeout(int removeAbandonedTimeout)
public String getValidationQuery()
public void setValidationQuery(String validationQuery)
public int getMaxActive()
public void setMaxActive(int maxActive)
public int getMaxIdle()
public void setMaxIdle(int maxIdle)
public int getMinIdle()
public void setMinIdle(int minIdle)
public long getMaxWait()
public void setMaxWait(long maxWait)
public byte getWhenExhaustedAction()
public void setWhenExhaustedAction(byte whenExhaustedAction)
public boolean isTestOnBorrow()
public void setTestOnBorrow(boolean testOnBorrow)
public boolean isTestOnReturn()
public void setTestOnReturn(boolean testOnReturn)
public boolean isTestWhileIdle()
public void setTestWhileIdle(boolean testWhileIdle)
public long getMinEvictableIdleTimeMillis()
public void setMinEvictableIdleTimeMillis(long minEvictableIdleTimeMillis)
public long getTimeBetweenEvictionRunsMillis()
public void setTimeBetweenEvictionRunsMillis(long timeBetweenEvictionRunsMillis)
public int getNumTestsPerEvictionRun()
public void setNumTestsPerEvictionRun(int numTestsPerEvictionRun)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||