Package com.zaxxer.hikari
Interface SQLExceptionOverride
-
public interface SQLExceptionOverrideUsers can implement this interface to override the default SQLException handling of HikariCP. When a SQLException is thrown from JDBC execution methods, the SQLState and error code will be checked to determine if the connection should be evicted from the pool.By supplying an implementation of this interface, users can override the default handling of SQLExceptions. The
adjudicate(SQLException)method will be called with the SQLException that was thrown. If the method returnsSQLExceptionOverride.Override.CONTINUE_EVICTthe customary built-in handling will occur. If the method returnsSQLExceptionOverride.Override.DO_NOT_EVICTthe eviction will be elided. If the method returnsSQLExceptionOverride.Override.MUST_EVICTthe eviction will be evicted regardless of the SQLState or error code.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSQLExceptionOverride.Override
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default SQLExceptionOverride.Overrideadjudicate(SQLException sqlException)This method is called when a SQLException is thrown from a JDBC method.
-
-
-
Method Detail
-
adjudicate
default SQLExceptionOverride.Override adjudicate(SQLException sqlException)
This method is called when a SQLException is thrown from a JDBC method.- Parameters:
sqlException- the SQLException that was thrown- Returns:
- an
SQLExceptionOverride.Overridevalue indicating how eviction should proceed
-
-