|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mchange.v2.c3p0.PoolConfig
public final class PoolConfig
Encapsulates all the configuration information required by a c3p0 pooled DataSource.
Newly constructed PoolConfig objects are preset with default values,
which you can define yourself (see below),
or you can rely on c3p0's built-in defaults. Just create a PoolConfig object, and change only the
properties you care about. Then pass it to the DataSources.pooledDataSource(javax.sql.DataSource, com.mchange.v2.c3p0.PoolConfig)
method, and you're off!
For those interested in the details, configuration properties can be specified in several ways:
Please see c3p0's main documentation for a description of all available parameters.
Field Summary | |
---|---|
static java.lang.String |
ACQUIRE_INCREMENT
Deprecated. |
static java.lang.String |
ACQUIRE_RETRY_ATTEMPTS
Deprecated. |
static java.lang.String |
ACQUIRE_RETRY_DELAY
Deprecated. |
static java.lang.String |
AUTO_COMMIT_ON_CLOSE
Deprecated. |
static java.lang.String |
AUTOMATIC_TEST_TABLE
Deprecated. |
static java.lang.String |
BREAK_AFTER_ACQUIRE_FAILURE
Deprecated. |
static java.lang.String |
CHECKOUT_TIMEOUT
Deprecated. |
static java.lang.String |
CONNECTION_TESTER_CLASS_NAME
Deprecated. |
static java.lang.String |
DEFAULT_CONFIG_RSRC_PATH
Deprecated. |
static java.lang.String |
FACTORY_CLASS_LOCATION
Deprecated. |
static java.lang.String |
FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
Deprecated. |
static java.lang.String |
IDLE_CONNECTION_TEST_PERIOD
Deprecated. |
static java.lang.String |
INITIAL_POOL_SIZE
Deprecated. |
static java.lang.String |
MAX_IDLE_TIME
Deprecated. |
static java.lang.String |
MAX_POOL_SIZE
Deprecated. |
static java.lang.String |
MAX_STATEMENTS
Deprecated. |
static java.lang.String |
MAX_STATEMENTS_PER_CONNECTION
Deprecated. |
static java.lang.String |
MIN_POOL_SIZE
Deprecated. |
static java.lang.String |
NUM_HELPER_THREADS
Deprecated. |
static java.lang.String |
PREFERRED_TEST_QUERY
Deprecated. |
static java.lang.String |
PROPERTY_CYCLE
Deprecated. |
static java.lang.String |
TEST_CONNECTION_ON_CHECKIN
Deprecated. |
static java.lang.String |
TEST_CONNECTION_ON_CHECKOUT
Deprecated. |
static java.lang.String |
USES_TRADITIONAL_REFLECTIVE_PROXIES
Deprecated. |
Constructor Summary | |
---|---|
PoolConfig()
Deprecated. |
|
PoolConfig(java.util.Properties props)
Deprecated. |
Method Summary | |
---|---|
static int |
defaultAcquireIncrement()
Deprecated. |
static int |
defaultAcquireRetryAttempts()
Deprecated. |
static int |
defaultAcquireRetryDelay()
Deprecated. |
static boolean |
defaultAutoCommitOnClose()
Deprecated. |
static java.lang.String |
defaultAutomaticTestTable()
Deprecated. |
static boolean |
defaultBreakAfterAcquireFailure()
Deprecated. |
static int |
defaultCheckoutTimeout()
Deprecated. |
static java.lang.String |
defaultConnectionTesterClassName()
Deprecated. |
static java.lang.String |
defaultFactoryClassLocation()
Deprecated. |
static boolean |
defaultForceIgnoreUnresolvedTransactions()
Deprecated. |
static int |
defaultIdleConnectionTestPeriod()
Deprecated. |
static int |
defaultInitialPoolSize()
Deprecated. |
static int |
defaultMaxIdleTime()
Deprecated. |
static int |
defaultMaxPoolSize()
Deprecated. |
static int |
defaultMaxStatements()
Deprecated. |
static int |
defaultMaxStatementsPerConnection()
Deprecated. |
static int |
defaultMinPoolSize()
Deprecated. |
static int |
defaultNumHelperThreads()
Deprecated. |
static java.lang.String |
defaultPreferredTestQuery()
Deprecated. |
static int |
defaultPropertyCycle()
Deprecated. |
static boolean |
defaultTestConnectionOnCheckin()
Deprecated. |
static boolean |
defaultTestConnectionOnCheckout()
Deprecated. |
static boolean |
defaultUsesTraditionalReflectiveProxies()
Deprecated. |
int |
getAcquireIncrement()
Deprecated. |
int |
getAcquireRetryAttempts()
Deprecated. |
int |
getAcquireRetryDelay()
Deprecated. |
java.lang.String |
getAutomaticTestTable()
Deprecated. |
int |
getCheckoutTimeout()
Deprecated. |
java.lang.String |
getConnectionTesterClassName()
Deprecated. |
java.lang.String |
getFactoryClassLocation()
Deprecated. |
int |
getIdleConnectionTestPeriod()
Deprecated. |
int |
getInitialPoolSize()
Deprecated. |
int |
getMaxIdleTime()
Deprecated. |
int |
getMaxPoolSize()
Deprecated. |
int |
getMaxStatements()
Deprecated. |
int |
getMaxStatementsPerConnection()
Deprecated. |
int |
getMinPoolSize()
Deprecated. |
int |
getNumHelperThreads()
Deprecated. |
java.lang.String |
getPreferredTestQuery()
Deprecated. |
int |
getPropertyCycle()
Deprecated. |
boolean |
getTestConnectionOnCheckout()
Deprecated. use isTestConnectionOnCheckout |
boolean |
isAutoCommitOnClose()
Deprecated. |
boolean |
isBreakAfterAcquireFailure()
Deprecated. |
boolean |
isForceIgnoreUnresolvedTransactions()
Deprecated. |
boolean |
isTestConnectionOnCheckin()
Deprecated. |
boolean |
isTestConnectionOnCheckout()
Deprecated. |
boolean |
isUsesTraditionalReflectiveProxies()
Deprecated. |
void |
setAcquireIncrement(int acquireIncrement)
Deprecated. |
void |
setAcquireRetryAttempts(int acquireRetryAttempts)
Deprecated. |
void |
setAcquireRetryDelay(int acquireRetryDelay)
Deprecated. |
void |
setAutoCommitOnClose(boolean autoCommitOnClose)
Deprecated. |
void |
setAutomaticTestTable(java.lang.String automaticTestTable)
Deprecated. |
void |
setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
Deprecated. |
void |
setCheckoutTimeout(int checkoutTimeout)
Deprecated. |
void |
setConnectionTesterClassName(java.lang.String connectionTesterClassName)
Deprecated. |
void |
setFactoryClassLocation(java.lang.String factoryClassLocation)
Deprecated. |
void |
setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
Deprecated. |
void |
setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
Deprecated. |
void |
setInitialPoolSize(int initialPoolSize)
Deprecated. |
void |
setMaxIdleTime(int maxIdleTime)
Deprecated. |
void |
setMaxPoolSize(int maxPoolSize)
Deprecated. |
void |
setMaxStatements(int maxStatements)
Deprecated. |
void |
setMaxStatementsPerConnection(int maxStatementsPerConnection)
Deprecated. |
void |
setMinPoolSize(int minPoolSize)
Deprecated. |
void |
setNumHelperThreads(int numHelperThreads)
Deprecated. |
void |
setPreferredTestQuery(java.lang.String preferredTestQuery)
Deprecated. |
void |
setPropertyCycle(int propertyCycle)
Deprecated. |
void |
setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
Deprecated. |
void |
setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
Deprecated. |
void |
setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INITIAL_POOL_SIZE
public static final java.lang.String MIN_POOL_SIZE
public static final java.lang.String MAX_POOL_SIZE
public static final java.lang.String IDLE_CONNECTION_TEST_PERIOD
public static final java.lang.String MAX_IDLE_TIME
public static final java.lang.String PROPERTY_CYCLE
public static final java.lang.String MAX_STATEMENTS
public static final java.lang.String MAX_STATEMENTS_PER_CONNECTION
public static final java.lang.String CHECKOUT_TIMEOUT
public static final java.lang.String ACQUIRE_INCREMENT
public static final java.lang.String ACQUIRE_RETRY_ATTEMPTS
public static final java.lang.String ACQUIRE_RETRY_DELAY
public static final java.lang.String BREAK_AFTER_ACQUIRE_FAILURE
public static final java.lang.String USES_TRADITIONAL_REFLECTIVE_PROXIES
public static final java.lang.String TEST_CONNECTION_ON_CHECKOUT
public static final java.lang.String TEST_CONNECTION_ON_CHECKIN
public static final java.lang.String CONNECTION_TESTER_CLASS_NAME
public static final java.lang.String AUTOMATIC_TEST_TABLE
public static final java.lang.String AUTO_COMMIT_ON_CLOSE
public static final java.lang.String FORCE_IGNORE_UNRESOLVED_TRANSACTIONS
public static final java.lang.String NUM_HELPER_THREADS
public static final java.lang.String PREFERRED_TEST_QUERY
public static final java.lang.String FACTORY_CLASS_LOCATION
public static final java.lang.String DEFAULT_CONFIG_RSRC_PATH
Constructor Detail |
---|
public PoolConfig(java.util.Properties props) throws java.lang.NumberFormatException
java.lang.NumberFormatException
public PoolConfig() throws java.lang.NumberFormatException
java.lang.NumberFormatException
Method Detail |
---|
public static int defaultNumHelperThreads()
public static java.lang.String defaultPreferredTestQuery()
public static java.lang.String defaultFactoryClassLocation()
public static int defaultMaxStatements()
public static int defaultMaxStatementsPerConnection()
public static int defaultInitialPoolSize()
public static int defaultMinPoolSize()
public static int defaultMaxPoolSize()
public static int defaultIdleConnectionTestPeriod()
public static int defaultMaxIdleTime()
public static int defaultPropertyCycle()
public static int defaultCheckoutTimeout()
public static int defaultAcquireIncrement()
public static int defaultAcquireRetryAttempts()
public static int defaultAcquireRetryDelay()
public static boolean defaultBreakAfterAcquireFailure()
public static java.lang.String defaultConnectionTesterClassName()
public static java.lang.String defaultAutomaticTestTable()
public static boolean defaultTestConnectionOnCheckout()
public static boolean defaultTestConnectionOnCheckin()
public static boolean defaultAutoCommitOnClose()
public static boolean defaultForceIgnoreUnresolvedTransactions()
public static boolean defaultUsesTraditionalReflectiveProxies()
public int getNumHelperThreads()
public java.lang.String getPreferredTestQuery()
public java.lang.String getFactoryClassLocation()
public int getMaxStatements()
public int getMaxStatementsPerConnection()
public int getInitialPoolSize()
public int getMinPoolSize()
public int getMaxPoolSize()
public int getIdleConnectionTestPeriod()
public int getMaxIdleTime()
public int getPropertyCycle()
public int getAcquireIncrement()
public int getCheckoutTimeout()
public int getAcquireRetryAttempts()
public int getAcquireRetryDelay()
public boolean isBreakAfterAcquireFailure()
public boolean isUsesTraditionalReflectiveProxies()
public java.lang.String getConnectionTesterClassName()
public java.lang.String getAutomaticTestTable()
public boolean getTestConnectionOnCheckout()
public boolean isTestConnectionOnCheckout()
public boolean isTestConnectionOnCheckin()
public boolean isAutoCommitOnClose()
public boolean isForceIgnoreUnresolvedTransactions()
public void setNumHelperThreads(int numHelperThreads)
public void setPreferredTestQuery(java.lang.String preferredTestQuery)
public void setFactoryClassLocation(java.lang.String factoryClassLocation)
public void setMaxStatements(int maxStatements)
public void setMaxStatementsPerConnection(int maxStatementsPerConnection)
public void setInitialPoolSize(int initialPoolSize)
public void setMinPoolSize(int minPoolSize)
public void setMaxPoolSize(int maxPoolSize)
public void setIdleConnectionTestPeriod(int idleConnectionTestPeriod)
public void setMaxIdleTime(int maxIdleTime)
public void setPropertyCycle(int propertyCycle)
public void setCheckoutTimeout(int checkoutTimeout)
public void setAcquireIncrement(int acquireIncrement)
public void setAcquireRetryAttempts(int acquireRetryAttempts)
public void setAcquireRetryDelay(int acquireRetryDelay)
public void setConnectionTesterClassName(java.lang.String connectionTesterClassName)
public void setAutomaticTestTable(java.lang.String automaticTestTable)
public void setBreakAfterAcquireFailure(boolean breakAfterAcquireFailure)
public void setUsesTraditionalReflectiveProxies(boolean usesTraditionalReflectiveProxies)
public void setTestConnectionOnCheckout(boolean testConnectionOnCheckout)
public void setTestConnectionOnCheckin(boolean testConnectionOnCheckin)
public void setAutoCommitOnClose(boolean autoCommitOnClose)
public void setForceIgnoreUnresolvedTransactions(boolean forceIgnoreUnresolvedTransactions)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |