Package io.agroal.test
Interface MockDataSource
-
- All Superinterfaces:
CommonDataSource,DataSource,Wrapper
- All Known Subinterfaces:
MockXADataSource
- All Known Implementing Classes:
MockDataSource.Empty,MockXADataSource.Empty
public interface MockDataSource extends DataSource
- Author:
- Luis Barreiro
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMockDataSource.Empty
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ConnectiongetConnection()default ConnectiongetConnection(String username, String password)default intgetLoginTimeout()default PrintWritergetLogWriter()default LoggergetParentLogger()default booleanisWrapperFor(Class<?> iface)default voidsetLoginTimeout(int seconds)default voidsetLogWriter(PrintWriter out)default <T> Tunwrap(Class<T> iface)-
Methods inherited from interface javax.sql.CommonDataSource
createShardingKeyBuilder
-
Methods inherited from interface javax.sql.DataSource
createConnectionBuilder
-
-
-
-
Method Detail
-
getConnection
default Connection getConnection() throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
getConnection
default Connection getConnection(String username, String password) throws SQLException
- Specified by:
getConnectionin interfaceDataSource- Throws:
SQLException
-
unwrap
default <T> T unwrap(Class<T> iface) throws SQLException
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
isWrapperFor
default boolean isWrapperFor(Class<?> iface) throws SQLException
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
getLogWriter
default PrintWriter getLogWriter() throws SQLException
- Specified by:
getLogWriterin interfaceCommonDataSource- Specified by:
getLogWriterin interfaceDataSource- Throws:
SQLException
-
setLogWriter
default void setLogWriter(PrintWriter out) throws SQLException
- Specified by:
setLogWriterin interfaceCommonDataSource- Specified by:
setLogWriterin interfaceDataSource- Throws:
SQLException
-
getLoginTimeout
default int getLoginTimeout() throws SQLException- Specified by:
getLoginTimeoutin interfaceCommonDataSource- Specified by:
getLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
setLoginTimeout
default void setLoginTimeout(int seconds) throws SQLException- Specified by:
setLoginTimeoutin interfaceCommonDataSource- Specified by:
setLoginTimeoutin interfaceDataSource- Throws:
SQLException
-
getParentLogger
default Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceCommonDataSource- Throws:
SQLFeatureNotSupportedException
-
-