Class UnpooledDataSource
java.lang.Object
org.apache.ibatis.datasource.unpooled.UnpooledDataSource
- All Implemented Interfaces:
Wrapper,CommonDataSource,DataSource
- Author:
- Clinton Begin, Eduardo Macarron
-
Constructor Summary
ConstructorsConstructorDescriptionUnpooledDataSource(ClassLoader driverClassLoader, String driver, String url, String username, String password) UnpooledDataSource(ClassLoader driverClassLoader, String driver, String url, Properties driverProperties) UnpooledDataSource(String driver, String url, String username, String password) UnpooledDataSource(String driver, String url, Properties driverProperties) -
Method Summary
Modifier and TypeMethodDescriptiongetConnection(String username, String password) Gets the default network timeout.intgetUrl()booleanisWrapperFor(Class<?> iface) voidsetAutoCommit(Boolean autoCommit) voidsetDefaultNetworkTimeout(Integer defaultNetworkTimeout) Sets the default network timeout value to wait for the database operation to complete.voidsetDefaultTransactionIsolationLevel(Integer defaultTransactionIsolationLevel) voidvoidsetDriverClassLoader(ClassLoader driverClassLoader) voidsetDriverProperties(Properties driverProperties) voidsetLoginTimeout(int loginTimeout) voidsetLogWriter(PrintWriter logWriter) voidsetPassword(String password) voidvoidsetUsername(String username) <T> T
-
Constructor Details
-
UnpooledDataSource
public UnpooledDataSource() -
UnpooledDataSource
-
UnpooledDataSource
-
UnpooledDataSource
public UnpooledDataSource(ClassLoader driverClassLoader, String driver, String url, String username, String password) -
UnpooledDataSource
public UnpooledDataSource(ClassLoader driverClassLoader, String driver, String url, Properties driverProperties)
-
-
Method Details
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
public void setLoginTimeout(int loginTimeout) - Specified by:
setLoginTimeoutin interfaceCommonDataSource
-
getLoginTimeout
public int getLoginTimeout()- Specified by:
getLoginTimeoutin interfaceCommonDataSource
-
setLogWriter
- Specified by:
setLogWriterin interfaceCommonDataSource
-
getLogWriter
- Specified by:
getLogWriterin interfaceCommonDataSource
-
getDriverClassLoader
-
setDriverClassLoader
-
getDriverProperties
-
setDriverProperties
-
getDriver
-
setDriver
-
getUrl
-
setUrl
-
getUsername
-
setUsername
-
getPassword
-
setPassword
-
isAutoCommit
-
setAutoCommit
-
getDefaultTransactionIsolationLevel
-
setDefaultTransactionIsolationLevel
-
getDefaultNetworkTimeout
Gets the default network timeout.- Returns:
- the default network timeout
- Since:
- 3.5.2
-
setDefaultNetworkTimeout
Sets the default network timeout value to wait for the database operation to complete. SeeConnection.setNetworkTimeout(java.util.concurrent.Executor, int)- Parameters:
defaultNetworkTimeout- The time in milliseconds to wait for the database operation to complete.- Since:
- 3.5.2
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getParentLogger
- Specified by:
getParentLoggerin interfaceCommonDataSource
-