Package io.agroal.api.configuration
Interface AgroalConnectionPoolConfiguration.ExceptionSorter
-
- All Known Implementing Classes:
DB2ExceptionSorter
,MSSQLExceptionSorter
,MySQLExceptionSorter
,OracleExceptionSorter
,PostgreSQLExceptionSorter
,SybaseExceptionSorter
- Enclosing interface:
- AgroalConnectionPoolConfiguration
public static interface AgroalConnectionPoolConfiguration.ExceptionSorter
Interface for custom exception sorter strategies. Determines if a connection is still usable after an exception occurs.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static AgroalConnectionPoolConfiguration.ExceptionSorter
defaultExceptionSorter()
Default exception sorter.static AgroalConnectionPoolConfiguration.ExceptionSorter
emptyExceptionSorter()
Never treat an exception as fatal.static AgroalConnectionPoolConfiguration.ExceptionSorter
fatalExceptionSorter()
Treats every exception as fatal.boolean
isFatal(SQLException se)
-
-
-
Method Detail
-
defaultExceptionSorter
static AgroalConnectionPoolConfiguration.ExceptionSorter defaultExceptionSorter()
Default exception sorter. Does not treat any exception as fatal.
-
emptyExceptionSorter
static AgroalConnectionPoolConfiguration.ExceptionSorter emptyExceptionSorter()
Never treat an exception as fatal.
-
fatalExceptionSorter
static AgroalConnectionPoolConfiguration.ExceptionSorter fatalExceptionSorter()
Treats every exception as fatal.
-
isFatal
boolean isFatal(SQLException se)
- Returns:
- true if an exception is considered fatal and the connection is not able for further use, false otherwise
-
-