|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.bc.gov.webade.dbpool.ConnectionPoolParams
| Field Summary | |
static java.lang.String |
DATABASE_PASSWORD
The JDBC password for the target database |
static java.lang.String |
DATABASE_URL
The JDBC URL for the target database |
static java.lang.String |
DATABASE_USER
The JDBC user name for the target database |
static int |
DEFAULT_MAX_CHECKOUT_TIME
The default pool connection maximum checkout time value. |
static int |
DEFAULT_MAX_CONNECTIONS
The default pool maximum connections value. |
static int |
DEFAULT_MAX_IDLE_TIME
The default pool connection maximum idle time value. |
static int |
DEFAULT_MAX_WAIT_TIME
The default pool connection maximum wait time value. |
static int |
DEFAULT_MIN_CONNECTIONS
The default pool minimum connections value. |
static int |
DEFAULT_MONITOR_SLEEP_TIME
The default pool sleep time value. |
static boolean |
DEFAULT_PING_CONNECTIONS_FLAG
The default ping connections flag value. |
static boolean |
DEFAULT_POOL_CONNECTIONS_FLAG
The default pool connections flag value. |
static java.lang.String |
MAX_CONNECTION_CHECKOUT_TIME
The maximum time, in minutes, a connection should remain checked out of the pool (0 if the connection should be left open indefinitely). |
static java.lang.String |
MAX_CONNECTION_IDLE_TIME
The maximum time, in minutes, a connection should remain open while available in the pool (0 if the connection should be left open indefinitely). |
static java.lang.String |
MAX_CONNECTION_WAIT_TIME
The maximum time, in milliseconds, a thread should block while waiting for a connection from the pool (0 if the thread should block indefinitely, -1 of it should never block). |
static java.lang.String |
MAX_CONNECTIONS
The maximum number of database connections to be opened at one time. |
static java.lang.String |
MIN_CONNECTIONS
The minimum number of database connections to be opened at one time. |
static java.lang.String |
MONITOR_SLEEP_TIME
The wait time, in minutes, the monitor thread will wait between connection pool checks. |
static java.lang.String |
PING_CONNECTIONS_FLAG
A flag indicating whether or not to test every database connection before allowing it to be checked out. |
static java.lang.String |
POOL_CONNECTIONS_FLAG
A flag indicating whether or not to pool database connections. |
| Constructor Summary | |
ConnectionPoolParams()
Default constructor |
|
ConnectionPoolParams(java.util.Properties props)
Create a params object with the given config properties. |
|
| Method Summary | |
long |
getMaxCheckoutTime()
|
int |
getMaxConnections()
|
long |
getMaxIdleTime()
|
long |
getMaxWaitTime()
|
int |
getMinConnections()
|
long |
getMonitorSleepTime()
|
java.lang.String |
getUrl()
|
java.lang.String |
getUser()
|
void |
setMaxCheckoutTime(long maxCheckoutTime)
|
void |
setMaxConnections(int maxConnections)
|
void |
setMaxIdleTime(long maxIdleTime)
|
void |
setMaxWaitTime(long maxWaitTime)
|
void |
setMinConnections(int minConnections)
|
void |
setMonitorSleepTime(long monitorSleepTime)
|
void |
setPassword(java.lang.String password)
|
void |
setPingConnections(boolean shouldPingConnections)
|
void |
setPoolConnections(boolean shouldPoolConnections)
|
void |
setUrl(java.lang.String url)
|
void |
setUser(java.lang.String user)
|
boolean |
shouldPingConnections()
|
boolean |
shouldPoolConnections()
|
java.lang.String |
toString()
|
void |
validateSettings()
Validates the current settings for the connection pool. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String DATABASE_URL
public static final java.lang.String DATABASE_USER
public static final java.lang.String DATABASE_PASSWORD
public static final java.lang.String MIN_CONNECTIONS
public static final java.lang.String MAX_CONNECTIONS
public static final java.lang.String MAX_CONNECTION_IDLE_TIME
public static final java.lang.String MAX_CONNECTION_CHECKOUT_TIME
public static final java.lang.String MAX_CONNECTION_WAIT_TIME
public static final java.lang.String MONITOR_SLEEP_TIME
public static final java.lang.String POOL_CONNECTIONS_FLAG
public static final java.lang.String PING_CONNECTIONS_FLAG
public static final int DEFAULT_MIN_CONNECTIONS
public static final int DEFAULT_MAX_CONNECTIONS
public static final int DEFAULT_MAX_IDLE_TIME
public static final int DEFAULT_MAX_CHECKOUT_TIME
public static final int DEFAULT_MAX_WAIT_TIME
public static final int DEFAULT_MONITOR_SLEEP_TIME
public static final boolean DEFAULT_POOL_CONNECTIONS_FLAG
public static final boolean DEFAULT_PING_CONNECTIONS_FLAG
| Constructor Detail |
public ConnectionPoolParams()
public ConnectionPoolParams(java.util.Properties props)
throws ConnectionPoolInitializationException
props - The name-value pairs of configuration settings.
ConnectionPoolInitializationException - Thrown if the given configuration settings are invalid.| Method Detail |
public int getMinConnections()
public void setMinConnections(int minConnections)
minConnections - The minConnections to set.public int getMaxConnections()
public void setMaxConnections(int maxConnections)
maxConnections - The maxConnections to set.public long getMaxIdleTime()
public void setMaxIdleTime(long maxIdleTime)
maxIdleTime - The maxIdleTime to set.public long getMaxCheckoutTime()
public void setMaxCheckoutTime(long maxCheckoutTime)
maxCheckoutTime - The maxCheckoutTime to set.public long getMaxWaitTime()
public void setMaxWaitTime(long maxWaitTime)
maxWaitTime - The maxWaitTime to set.public long getMonitorSleepTime()
public void setMonitorSleepTime(long monitorSleepTime)
monitorSleepTime - The monitorSleepTime to set.public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url - The url to set.public java.lang.String getUser()
public void setUser(java.lang.String user)
user - The user to set.public void setPassword(java.lang.String password)
password - The password to set.public boolean shouldPoolConnections()
public void setPoolConnections(boolean shouldPoolConnections)
shouldPoolConnections - The Pool Connections flag to set.public boolean shouldPingConnections()
public void setPingConnections(boolean shouldPingConnections)
shouldPingConnections - The Ping Connections flag to set.
public void validateSettings()
throws ConnectionPoolInitializationException
ConnectionPoolInitializationExceptionpublic java.lang.String toString()
Object.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||