public class MockDriver extends Object implements Driver, MockDriverMBean
| 限定符和类型 | 字段和说明 |
|---|---|
static MockExecuteHandler |
DEFAULT_HANDLER |
static MockDriver |
instance |
| 构造器和说明 |
|---|
MockDriver() |
public static final MockExecuteHandler DEFAULT_HANDLER
public static final MockDriver instance
public boolean isLogExecuteQueryEnable()
isLogExecuteQueryEnable 在接口中 MockDriverMBeanpublic void setLogExecuteQueryEnable(boolean logExecuteQueryEnable)
setLogExecuteQueryEnable 在接口中 MockDriverMBeanpublic long getIdleTimeCount()
getIdleTimeCount 在接口中 MockDriverMBeanpublic void setIdleTimeCount(long idleTimeCount)
setIdleTimeCount 在接口中 MockDriverMBeanpublic long generateConnectionId()
public void closeAllConnections()
throws SQLException
closeAllConnections 在接口中 MockDriverMBeanSQLExceptionpublic int getConnectionsSize()
getConnectionsSize 在接口中 MockDriverMBeanpublic List<MockConnection> getConnections()
public long getConnectionCloseCount()
getConnectionCloseCount 在接口中 MockDriverMBeanpublic static boolean registerDriver(Driver driver)
public MockExecuteHandler getExecuteHandler()
public void setExecuteHandler(MockExecuteHandler executeHandler)
public Connection connect(String url, Properties info) throws SQLException
connect 在接口中 DriverSQLExceptionpublic boolean acceptsURL(String url) throws SQLException
acceptsURL 在接口中 MockDriverMBeanacceptsURL 在接口中 DriverSQLExceptionpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
getPropertyInfo 在接口中 DriverSQLExceptionpublic int getMajorVersion()
getMajorVersion 在接口中 MockDriverMBeangetMajorVersion 在接口中 Driverpublic int getMinorVersion()
getMinorVersion 在接口中 MockDriverMBeangetMinorVersion 在接口中 Driverpublic boolean jdbcCompliant()
jdbcCompliant 在接口中 MockDriverMBeanjdbcCompliant 在接口中 Driverpublic ResultSet executeQuery(MockStatementBase stmt, String sql) throws SQLException
SQLExceptionpublic void handleSleep(MockConnection conn)
public ResultSet createResultSet(MockPreparedStatement stmt)
public Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger 在接口中 DriverSQLFeatureNotSupportedExceptionpublic MockConnection createMockConnection(MockDriver driver, String url, Properties connectProperties)
public MockPreparedStatement createMockPreparedStatement(MockConnection conn, String sql)
public MockStatement createMockStatement(MockConnection conn)
public MockCallableStatement createMockCallableStatement(MockConnection conn, String sql)
Copyright © 2012 Alibaba Group. All Rights Reserved.