Package io.agroal.pool
Interface Pool
-
- All Superinterfaces:
AgroalDataSourceConfiguration.MetricsEnabledListener
,AutoCloseable
- All Known Implementing Classes:
ConnectionPool
,Poolless
public interface Pool extends AgroalDataSourceConfiguration.MetricsEnabledListener, AutoCloseable
- Author:
- Luis Barreiro
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
activeCount()
long
availableCount()
long
awaitingCount()
void
close()
int
defaultJdbcIsolationLevel()
void
flushPool(AgroalDataSource.FlushMode mode)
AgroalConnectionPoolConfiguration
getConfiguration()
Connection
getConnection()
AgroalDataSourceListener[]
getListeners()
AgroalDataSourceMetrics
getMetrics()
List<AgroalPoolInterceptor>
getPoolInterceptors()
void
init()
boolean
isHealthy(boolean newConnection)
long
maxUsedCount()
void
resetMaxUsedCount()
void
returnConnectionHandler(ConnectionHandler handler)
void
setPoolInterceptors(Collection<? extends AgroalPoolInterceptor> list)
-
Methods inherited from interface io.agroal.api.configuration.AgroalDataSourceConfiguration.MetricsEnabledListener
onMetricsEnabled
-
-
-
-
Method Detail
-
init
void init()
-
getConnection
Connection getConnection() throws SQLException
- Throws:
SQLException
-
getConfiguration
AgroalConnectionPoolConfiguration getConfiguration()
-
getMetrics
AgroalDataSourceMetrics getMetrics()
-
getListeners
AgroalDataSourceListener[] getListeners()
-
getPoolInterceptors
List<AgroalPoolInterceptor> getPoolInterceptors()
-
setPoolInterceptors
void setPoolInterceptors(Collection<? extends AgroalPoolInterceptor> list)
-
returnConnectionHandler
void returnConnectionHandler(ConnectionHandler handler) throws SQLException
- Throws:
SQLException
-
flushPool
void flushPool(AgroalDataSource.FlushMode mode)
-
isHealthy
boolean isHealthy(boolean newConnection) throws SQLException
- Throws:
SQLException
-
defaultJdbcIsolationLevel
int defaultJdbcIsolationLevel()
-
close
void close()
- Specified by:
close
in interfaceAutoCloseable
-
activeCount
long activeCount()
-
maxUsedCount
long maxUsedCount()
-
availableCount
long availableCount()
-
awaitingCount
long awaitingCount()
-
resetMaxUsedCount
void resetMaxUsedCount()
-
-