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 longactiveCount()longavailableCount()longawaitingCount()voidclose()voidflushPool(AgroalDataSource.FlushMode mode)AgroalConnectionPoolConfigurationgetConfiguration()ConnectiongetConnection()AgroalDataSourceListener[]getListeners()AgroalDataSourceMetricsgetMetrics()List<AgroalPoolInterceptor>getPoolInterceptors()voidinit()longmaxUsedCount()voidresetMaxUsedCount()voidreturnConnectionHandler(ConnectionHandler handler)voidsetPoolInterceptors(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)
-
close
void close()
- Specified by:
closein interfaceAutoCloseable
-
activeCount
long activeCount()
-
maxUsedCount
long maxUsedCount()
-
availableCount
long availableCount()
-
awaitingCount
long awaitingCount()
-
resetMaxUsedCount
void resetMaxUsedCount()
-
-