Class JdbcConnectionUtils
java.lang.Object
io.micronaut.data.connection.support.JdbcConnectionUtils
JDBC connection utils.
- Since:
- 4.0.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyAutoCommit
(org.slf4j.Logger logger, Connection connection, boolean autoCommit, List<Runnable> onCompleteCallbacks) Apply auto commit value.static void
applyHoldability
(org.slf4j.Logger logger, Connection connection, int holdability, List<Runnable> onCompleteCallbacks) Apply holdability.static void
applyReadOnly
(org.slf4j.Logger logger, Connection connection, boolean isReadOnly, List<Runnable> onCompleteCallbacks) Apply read only value.static void
applyTransactionIsolation
(org.slf4j.Logger logger, Connection connection, int txIsolationLevel, List<Runnable> onCompleteCallbacks) Apply TX isolation level.
-
Method Details
-
applyAutoCommit
public static void applyAutoCommit(org.slf4j.Logger logger, Connection connection, boolean autoCommit, List<Runnable> onCompleteCallbacks) Apply auto commit value.- Parameters:
logger
- The loggerconnection
- The connectionautoCommit
- The autocommit valueonCompleteCallbacks
- The callback to restore the original value
-
applyReadOnly
public static void applyReadOnly(org.slf4j.Logger logger, Connection connection, boolean isReadOnly, List<Runnable> onCompleteCallbacks) Apply read only value.- Parameters:
logger
- The loggerconnection
- The connectionisReadOnly
- The read only valueonCompleteCallbacks
- The callback to restore the original value
-
applyTransactionIsolation
public static void applyTransactionIsolation(org.slf4j.Logger logger, Connection connection, int txIsolationLevel, List<Runnable> onCompleteCallbacks) Apply TX isolation level.- Parameters:
logger
- The loggerconnection
- The connectiontxIsolationLevel
- The TX isolation levelonCompleteCallbacks
- The callback to restore the original value
-
applyHoldability
public static void applyHoldability(org.slf4j.Logger logger, Connection connection, int holdability, List<Runnable> onCompleteCallbacks) Apply holdability.- Parameters:
logger
- The loggerconnection
- The connectionholdability
- The holdabilityonCompleteCallbacks
- The callback to restore the original value
-