Package org.jdbi.v3.core
Class LazyHandleSupplier
java.lang.Object
org.jdbi.v3.core.AbstractHandleSupplier
org.jdbi.v3.core.LazyHandleSupplier
- All Implemented Interfaces:
AutoCloseable,HandleSupplier,OnDemandHandleSupplier
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jdbi.v3.core.AbstractHandleSupplier
currentExtensionContext, invokeInContext
-
Field Details
-
jdbi
-
handleHolder
-
-
Constructor Details
-
LazyHandleSupplier
LazyHandleSupplier(Jdbi jdbi)
-
-
Method Details
-
getConfig
Description copied from interface:HandleSupplierReturns the current Jdbi config.- Specified by:
getConfigin interfaceHandleSupplier- Returns:
- The current Jdbi configuration.
-
getJdbi
Description copied from interface:HandleSupplierReturns the owning Jdbi instance.- Specified by:
getJdbiin interfaceHandleSupplier- Returns:
- The owning Jdbi instance.
-
getHandle
Description copied from interface:HandleSupplierReturns a handle, possibly creating it lazily. A Handle holds a database connection, so extensions should only call this method in order to interact with the database.- Specified by:
getHandlein interfaceHandleSupplier- Returns:
- An open Handle.
-
createHandle
-
withHandle
- Specified by:
withHandlein classAbstractHandleSupplier
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceHandleSupplier- Overrides:
closein classAbstractHandleSupplier
-