Package org.jdbi.v3.core.async
Class JdbiExecutorImpl
java.lang.Object
org.jdbi.v3.core.async.AbstractJdbiExecutor
org.jdbi.v3.core.async.JdbiExecutorImpl
- All Implemented Interfaces:
JdbiExecutor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> CompletionStage<T>withExecute(CheckedFunction<Jdbi, T> callback) Make sure to run the callback in a thread supplied by the executorMethods inherited from class org.jdbi.v3.core.async.AbstractJdbiExecutor
inTransaction, inTransaction, useExecute, useExtension, useHandle, useTransaction, useTransaction, withExtension, withHandle
-
Field Details
-
jdbi
-
executor
-
-
Constructor Details
-
JdbiExecutorImpl
Construct aJdbiExecutor.- Parameters:
jdbi- the initialized Jdbi classexecutor- an executor to use for all database calls
-
-
Method Details
-
withExecute
Make sure to run the callback in a thread supplied by the executor- Specified by:
withExecutein classAbstractJdbiExecutor- Type Parameters:
T- type returned by the callback- Parameters:
callback- the callback that takes a Jdbi instance and returns a value- Returns:
- a completion stage that will complete when the callback returns a value or throws an exception
-