public final class DataSource extends Object implements AgroalDataSource
AgroalDataSource.FlushMode| Constructor and Description |
|---|
DataSource(AgroalDataSourceConfiguration dataSourceConfiguration,
AgroalDataSourceListener... listeners) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush(AgroalDataSource.FlushMode mode) |
AgroalDataSourceConfiguration |
getConfiguration() |
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
AgroalDataSourceMetrics |
getMetrics() |
Logger |
getParentLogger() |
boolean |
isWrapperFor(Class<?> target) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
<T> T |
unwrap(Class<T> target) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfrom, frompublic DataSource(AgroalDataSourceConfiguration dataSourceConfiguration, AgroalDataSourceListener... listeners)
public AgroalDataSourceConfiguration getConfiguration()
getConfiguration in interface AgroalDataSourcepublic AgroalDataSourceMetrics getMetrics()
getMetrics in interface AgroalDataSourcepublic void flush(AgroalDataSource.FlushMode mode)
flush in interface AgroalDataSourcepublic void close()
close in interface AgroalDataSourceclose in interface AutoCloseablepublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic <T> T unwrap(Class<T> target) throws SQLException
unwrap in interface WrapperSQLExceptionpublic boolean isWrapperFor(Class<?> target) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic Logger getParentLogger() throws SQLFeatureNotSupportedException
getParentLogger in interface CommonDataSourceSQLFeatureNotSupportedExceptionCopyright © 2019 JBoss by Red Hat. All rights reserved.