Constructor and Description |
---|
FiberDBI(DataSource dataSource)
Constructor for use with a DataSource which will provide using 10 threads fixed pool executor
|
FiberDBI(DataSource dataSource,
ExecutorService es)
Constructor for use with a DataSource which will provide
|
FiberDBI(DataSource dataSource,
int threadCount)
Constructor for use with a DataSource which will provide using fixed thread pool executor
|
FiberDBI(IDBI jdbi) |
Modifier and Type | Method and Description |
---|---|
void |
close(Object sqlObject) |
void |
define(String key,
Object value) |
<ReturnType> |
inTransaction(TransactionCallback<ReturnType> callback) |
<ReturnType> |
inTransaction(TransactionIsolationLevel isolation,
TransactionCallback<ReturnType> callback) |
<SqlObjectType> |
onDemand(Class<SqlObjectType> sqlObjectType) |
Handle |
open() |
<SqlObjectType> |
open(Class<SqlObjectType> sqlObjectType) |
void |
useHandle(HandleConsumer callback) |
void |
useTransaction(TransactionConsumer callback) |
void |
useTransaction(TransactionIsolationLevel isolation,
TransactionConsumer callback) |
<ReturnType> |
withHandle(HandleCallback<ReturnType> callback) |
public FiberDBI(IDBI jdbi)
jdbi
- jdbi based on FiberDataSourcepublic FiberDBI(DataSource dataSource, ExecutorService es)
Constructor for use with a DataSource which will provide
dataSource
- may or may not be FiberDataSourcees
- public FiberDBI(DataSource dataSource, int threadCount)
Constructor for use with a DataSource which will provide using fixed thread pool executor
dataSource
- may or may not be FiberDataSourcethreadCount
- public FiberDBI(DataSource dataSource)
Constructor for use with a DataSource which will provide using 10 threads fixed pool executor
dataSource
- may or may not be FiberDataSource@Suspendable public Handle open()
@Suspendable public <ReturnType> ReturnType withHandle(HandleCallback<ReturnType> callback) throws CallbackFailedException
withHandle
in interface IDBI
CallbackFailedException
@Suspendable public void useHandle(HandleConsumer callback) throws CallbackFailedException
useHandle
in interface IDBI
CallbackFailedException
@Suspendable public <SqlObjectType> SqlObjectType open(Class<SqlObjectType> sqlObjectType)
@Suspendable public void close(Object sqlObject)
public <SqlObjectType> SqlObjectType onDemand(Class<SqlObjectType> sqlObjectType)
@Suspendable public <ReturnType> ReturnType inTransaction(TransactionCallback<ReturnType> callback) throws CallbackFailedException
inTransaction
in interface IDBI
CallbackFailedException
@Suspendable public void useTransaction(TransactionConsumer callback) throws CallbackFailedException
useTransaction
in interface IDBI
CallbackFailedException
@Suspendable public <ReturnType> ReturnType inTransaction(TransactionIsolationLevel isolation, TransactionCallback<ReturnType> callback) throws CallbackFailedException
inTransaction
in interface IDBI
CallbackFailedException
@Suspendable public void useTransaction(TransactionIsolationLevel isolation, TransactionConsumer callback) throws CallbackFailedException
useTransaction
in interface IDBI
CallbackFailedException