| |
|
| java.lang.Object com.ibatis.common.jdbc.SimpleDataSource
SimpleDataSource | public class SimpleDataSource implements DataSource(Code) | | This is a simple, synchronous, thread-safe database connection pool.
REQUIRED PROPERTIES
-------------------
JDBC.Driver
JDBC.ConnectionURL
JDBC.Username
JDBC.Password
Pool.MaximumActiveConnections
Pool.MaximumIdleConnections
Pool.MaximumCheckoutTime
Pool.TimeToWait
Pool.PingQuery
Pool.PingEnabled
Pool.PingConnectionsOlderThan
Pool.PingConnectionsNotUsedFor
Pool.QuietMode
|
SimpleDataSource | public SimpleDataSource(Map props)(Code) | | Constructor to allow passing in a map of properties for configuration
Parameters: props - - the configuration parameters |
forceCloseAll | public void forceCloseAll()(Code) | | Closes all of the connections in the pool
|
getAverageCheckoutTime | public long getAverageCheckoutTime()(Code) | | Getter for the average age of a connection checkout
The average age |
getAverageOverdueCheckoutTime | public long getAverageOverdueCheckoutTime()(Code) | | Getter for the average age of overdue connections
The average age |
getAverageRequestTime | public long getAverageRequestTime()(Code) | | Getter for the average time required to get a connection to the database
The average time |
getAverageWaitTime | public long getAverageWaitTime()(Code) | | Getter for the average time spent waiting for connections that were in use
The average time |
getBadConnectionCount | public long getBadConnectionCount()(Code) | | Getter for the number of invalid connections that were found in the pool
The number of invalid connections |
getClaimedOverdueConnectionCount | public long getClaimedOverdueConnectionCount()(Code) | | Getter for the number of connections that were claimed before they were returned
The number of connections |
getHadToWaitCount | public long getHadToWaitCount()(Code) | | Getter for the number of requests that had to wait for connections that were in use
The number of requests that had to wait |
getJdbcDriver | public String getJdbcDriver()(Code) | | Getter for the name of the JDBC driver class used
The name of the class |
getJdbcPassword | public String getJdbcPassword()(Code) | | Getter for the JDBC password used
The password |
getJdbcUrl | public String getJdbcUrl()(Code) | | Getter of the JDBC URL used
The JDBC URL |
getJdbcUsername | public String getJdbcUsername()(Code) | | Getter for the JDBC user name used
The user name |
getPoolMaximumActiveConnections | public int getPoolMaximumActiveConnections()(Code) | | Getter for the maximum number of active connections
The maximum number of active connections |
getPoolMaximumCheckoutTime | public int getPoolMaximumCheckoutTime()(Code) | | Getter for the maximum time a connection can be used before it *may* be
given away again.
The maximum time |
getPoolMaximumIdleConnections | public int getPoolMaximumIdleConnections()(Code) | | Getter for the maximum number of idle connections
The maximum number of idle connections |
getPoolPingConnectionsNotUsedFor | public int getPoolPingConnectionsNotUsedFor()(Code) | | If a connection has not been used in this many milliseconds, ping the
database to make sure the connection is still good.
the number of milliseconds of inactivity that will trigger a ping |
getPoolPingConnectionsOlderThan | public int getPoolPingConnectionsOlderThan()(Code) | | Getter for the age of connections that should be pinged before using
The age |
getPoolPingQuery | public String getPoolPingQuery()(Code) | | Getter for the query to be used to check a connection
The query |
getPoolTimeToWait | public int getPoolTimeToWait()(Code) | | Getter for the time to wait before retrying to get a connection
The time to wait |
getRequestCount | public long getRequestCount()(Code) | | Getter for the number of connection requests made
The number of connection requests made |
getStatus | public String getStatus()(Code) | | Returns the status of the connection pool
The status |
isPoolPingEnabled | public boolean isPoolPingEnabled()(Code) | | Getter to tell if we should use the ping query
True if we need to check a connection before using it |
unwrapConnection | public static Connection unwrapConnection(Connection conn)(Code) | | Unwraps a pooled connection to get to the 'real' connection
Parameters: conn - - the pooled connection to unwrap The 'real' connection |
|
|
|