public final class ShardingConnection extends AbstractConnectionAdapter
| 构造器和说明 |
|---|
ShardingConnection() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
Statement |
createStatement() |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency) |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
Connection |
getConnection(String dataSourceName,
SQLStatementType sqlStatementType)
根据数据源名称获取相应的数据库连接.
|
Collection<Connection> |
getConnections() |
DatabaseMetaData |
getMetaData() |
PreparedStatement |
prepareStatement(String sql) |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys) |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency) |
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability) |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames) |
void |
releaseBrokenConnection(Connection brokenConnection)
释放缓存中已经中断的数据库连接.
|
clearWarnings, commit, getAutoCommit, getHoldability, getTransactionIsolation, getWarnings, isClosed, isReadOnly, rollback, setAutoCommit, setHoldability, setReadOnly, setTransactionIsolationabort, 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, waitisWrapperFor, unwrappublic Connection getConnection(String dataSourceName, SQLStatementType sqlStatementType) throws SQLException
dataSourceName - 数据源名称sqlStatementType - SQL语句类型SQLExceptionpublic void releaseBrokenConnection(Connection brokenConnection)
brokenConnection - 已经中断的数据库连接public DatabaseMetaData getMetaData() throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
SQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
SQLExceptionpublic Statement createStatement() throws SQLException
SQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
SQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
SQLExceptionpublic Collection<Connection> getConnections()
getConnections 在类中 AbstractConnectionAdapterpublic void close()
throws SQLException
close 在接口中 AutoCloseableclose 在接口中 Connectionclose 在类中 AbstractConnectionAdapterSQLExceptionCopyright © 2016. All rights reserved.