public class MultiConnectionImplementation extends ConnectionWrapper implements MultiConnection
| Modifier and Type | Field and Description |
|---|---|
static int |
CON_BUSY |
static int |
CON_FAILED |
static int |
CON_FINISHED |
static int |
CON_UNUSED |
(package private) String |
lastSql |
(package private) MultiPool |
parent |
static long |
queries |
(package private) Exception |
stackTrace |
int |
state |
con| Constructor and Description |
|---|
MultiConnectionImplementation(MultiPool parent,
Connection con) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAfterException()
Tries to fix the this connection, if it proves to be broken.
|
boolean |
checkSQLError(Exception e) |
void |
claim() |
void |
close()
Close connections
|
Statement |
createStatement()
createStatement returns an SQL Statement object
|
Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
createStatement returns an SQL Statement object
|
Statement |
createStatement(int type,
int concurrency,
int holdability) |
String |
getLastSQL() |
MultiPool |
getParent() |
Connection |
getRealConnection()
Deprecated.
Use
ConnectionWrapper.unwrap(Class) (a java 1.6 method from 'Wrapper') |
Exception |
getStackTrace() |
int |
getStartTime()
Returns the moment on which the last SQL statement was started in seconds after 1970.
|
long |
getStartTimeMillis()
Returns the moment on which the last SQL statement was started in milliseconds after 1970.
|
String |
getStateString() |
int |
getUsage() |
void |
realclose()
Close connections
|
void |
release() |
void |
resetUsage() |
void |
setAutoCommit(boolean enableAutoCommit)
If "autoCommit" is true, then all subsequent SQL statements will
be executed and committed as individual transactions.
|
void |
setLastSQL(String sql)
Called just before every prepare statement.
|
String |
toString() |
void |
wrap(Connection con) |
clearWarnings, commit, createArrayOf, createStruct, getAutoCommit, getCatalog, getClientInfo, getClientInfo, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, isValid, isWrapperFor, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclearWarnings, commit, getAutoCommit, getCatalog, getHoldability, getMetaData, getTransactionIsolation, getTypeMap, getWarnings, isClosed, isReadOnly, nativeSQL, prepareCall, prepareCall, prepareCall, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, releaseSavepoint, rollback, rollback, setCatalog, setHoldability, setReadOnly, setSavepoint, setSavepoint, setTransactionIsolation, setTypeMap, unwrappublic static final int CON_UNUSED
public static final int CON_BUSY
public static final int CON_FINISHED
public static final int CON_FAILED
public static long queries
MultiPool parent
String lastSql
Exception stackTrace
public int state
public MultiConnectionImplementation(MultiPool parent, Connection con)
public MultiPool getParent()
getParent in interface MultiConnectionpublic String getStateString()
getStateString in interface MultiConnectionpublic void setLastSQL(String sql)
ConnectionWrappersetLastSQL in interface MultiConnectionsetLastSQL in class ConnectionWrapperpublic String getLastSQL()
getLastSQL in interface MultiConnectionpublic Exception getStackTrace()
getStackTrace in interface MultiConnectionpublic Statement createStatement() throws SQLException
createStatement in interface MultiConnectioncreateStatement in class ConnectionWrapperSQLExceptionConnection.createStatement()public boolean checkAfterException()
throws SQLException
checkAfterException in interface MultiConnectiontrue if connection was broken and successfully repaired. false if connection was not broken.SQLException - If connection is broken and no new one could be obtained.public void setAutoCommit(boolean enableAutoCommit)
throws SQLException
setAutoCommit in interface MultiConnectionsetAutoCommit in class ConnectionWrapperSQLExceptionConnection.setAutoCommit(boolean)public void close()
throws SQLException
close in interface MultiConnectionclose in class ConnectionWrapperSQLExceptionConnection.close()public void realclose()
throws SQLException
realclose in interface MultiConnectionSQLExceptionpublic boolean checkSQLError(Exception e)
public void claim()
claim in interface MultiConnectionpublic void release()
release in interface MultiConnectionpublic int getUsage()
getUsage in interface MultiConnectionpublic void resetUsage()
resetUsage in interface MultiConnectionpublic int getStartTime()
getStartTime in interface MultiConnectionpublic long getStartTimeMillis()
getStartTimeMillis in interface MultiConnectionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
createStatement in interface MultiConnectioncreateStatement in class ConnectionWrapperSQLExceptionConnection.createStatement(int, int)public Statement createStatement(int type, int concurrency, int holdability) throws SQLException
createStatement in interface MultiConnectioncreateStatement in class ConnectionWrapperSQLExceptionConnection.createStatement(int, int, int)public Connection getRealConnection()
ConnectionWrapper.unwrap(Class) (a java 1.6 method from 'Wrapper')public void wrap(Connection con)
wrap in interface MultiConnectionMMBase 1.9-SNAPSHOT - ${javadoctimestamp}