|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jolbox.bonecp.BoneCP
public class BoneCP
Connection pool (main class).
| Field Summary | |
|---|---|
static java.lang.String |
MBEAN_BONECP
JMX constant. |
static java.lang.String |
MBEAN_CONFIG
JMX constant. |
| Constructor Summary | |
|---|---|
BoneCP(BoneCPConfig config)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Just a synonym to shutdown. |
java.util.concurrent.Future<java.sql.Connection> |
getAsyncConnection()
Obtain a connection asynchronously by queueing a request to obtain a connection in a separate thread. |
BoneCPConfig |
getConfig()
Gets config object. |
java.sql.Connection |
getConnection()
Returns a free connection. |
Statistics |
getStatistics()
Returns a reference to the statistics class. |
int |
getTotalCreatedConnections()
Return total number of connections created in all partitions. |
int |
getTotalFree()
Return the number of free connections available to an application right away (excluding connections that can be created dynamically) |
int |
getTotalLeased()
Return total number of connections currently in use by an application |
boolean |
isConnectionHandleAlive(ConnectionHandle connection)
Sends a dummy statement to the server to keep the connection alive |
void |
shutdown()
Closes off this connection pool. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MBEAN_CONFIG
public static final java.lang.String MBEAN_BONECP
| Constructor Detail |
|---|
public BoneCP(BoneCPConfig config)
throws java.sql.SQLException
config - Configuration for pool
java.sql.SQLException - on error| Method Detail |
|---|
public void shutdown()
public void close()
public java.sql.Connection getConnection()
throws java.sql.SQLException
java.sql.SQLExceptionpublic java.util.concurrent.Future<java.sql.Connection> getAsyncConnection()
Future<Connection> result = pool.getAsyncConnection();
... do something else in your application here ...
Connection connection = result.get(); // get the connection
public boolean isConnectionHandleAlive(ConnectionHandle connection)
connection - Connection handle to perform activity on
public int getTotalLeased()
public int getTotalFree()
public int getTotalCreatedConnections()
public BoneCPConfig getConfig()
public Statistics getStatistics()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||