public abstract class AbstractConnectionAdapter extends AbstractUnsupportedOperationConnection
Connection.TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractConnectionAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearWarnings() |
void |
close() |
void |
commit() |
protected abstract Connection |
createConnection(String dataSourceName,
DataSource dataSource) |
boolean |
getAutoCommit() |
Connection |
getConnection(String dataSourceName)
Get database connection.
|
List<Connection> |
getConnections(org.apache.shardingsphere.core.constant.ConnectionMode connectionMode,
String dataSourceName,
int connectionSize)
Get database connections.
|
protected abstract Map<String,DataSource> |
getDataSourceMap() |
int |
getHoldability() |
int |
getTransactionIsolation() |
SQLWarning |
getWarnings() |
boolean |
isClosed() |
boolean |
isReadOnly() |
void |
rollback() |
void |
setAutoCommit(boolean autoCommit) |
void |
setHoldability(int holdability) |
void |
setReadOnly(boolean readOnly) |
void |
setTransactionIsolation(int level) |
abort, createArrayOf, createBlob, createClob, createNClob, createSQLXML, createStruct, getCatalog, getClientInfo, getClientInfo, getNetworkTimeout, getSchema, getTypeMap, isValid, nativeSQL, prepareCall, prepareCall, prepareCall, releaseSavepoint, rollback, setCatalog, setClientInfo, setClientInfo, setNetworkTimeout, setSavepoint, setSavepoint, setSchema, setTypeMapisWrapperFor, recordMethodInvocation, replayMethodsInvocation, unwrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateStatement, createStatement, createStatement, getMetaData, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatement, prepareStatementisWrapperFor, unwrappublic final Connection getConnection(String dataSourceName) throws SQLException
dataSourceName - data source nameSQLException - SQL exceptionpublic final List<Connection> getConnections(org.apache.shardingsphere.core.constant.ConnectionMode connectionMode, String dataSourceName, int connectionSize) throws SQLException
connectionMode - connection modedataSourceName - data source nameconnectionSize - size of connection list to be getSQLException - SQL exceptionprotected abstract Connection createConnection(String dataSourceName, DataSource dataSource) throws SQLException
SQLExceptionprotected abstract Map<String,DataSource> getDataSourceMap()
public final boolean getAutoCommit()
public void setAutoCommit(boolean autoCommit)
throws SQLException
SQLExceptionpublic void commit()
throws SQLException
SQLExceptionpublic void rollback()
throws SQLException
SQLExceptionpublic final void close()
throws SQLException
SQLExceptionpublic final boolean isClosed()
public final boolean isReadOnly()
public final void setReadOnly(boolean readOnly)
throws SQLException
SQLExceptionpublic final int getTransactionIsolation()
throws SQLException
SQLExceptionpublic final void setTransactionIsolation(int level)
throws SQLException
SQLExceptionpublic final SQLWarning getWarnings()
public void clearWarnings()
public final int getHoldability()
public final void setHoldability(int holdability)
Copyright © 2020 The Apache Software Foundation. All rights reserved.