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() |
List<AgroalPoolInterceptor> |
getPoolInterceptors() |
boolean |
isHealthy(boolean newConnection) |
boolean |
isWrapperFor(Class<?> target) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setPoolInterceptors(Collection<? extends AgroalPoolInterceptor> interceptors) |
<T> T |
unwrap(Class<T> target) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitfrom, frompublic DataSource(AgroalDataSourceConfiguration dataSourceConfiguration, AgroalDataSourceListener... listeners)
public void setPoolInterceptors(Collection<? extends AgroalPoolInterceptor> interceptors)
setPoolInterceptors in interface AgroalDataSourcepublic List<AgroalPoolInterceptor> getPoolInterceptors()
getPoolInterceptors in interface AgroalDataSourcepublic AgroalDataSourceConfiguration getConfiguration()
getConfiguration in interface AgroalDataSourcepublic AgroalDataSourceMetrics getMetrics()
getMetrics in interface AgroalDataSourcepublic void flush(AgroalDataSource.FlushMode mode)
flush in interface AgroalDataSourcepublic boolean isHealthy(boolean newConnection)
throws SQLException
isHealthy in interface AgroalDataSourceSQLExceptionpublic 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 © 2023 JBoss by Red Hat. All rights reserved.