public interface TransactionHandler
IDBI
instance. All Handle
instances
opened from that IDBI
will use the handler specified.
The default implementation, ConnectionTransactionHandler
, explicitely manages
the transactions on the underlying JDBC Connection
.Modifier and Type | Method and Description |
---|---|
void |
begin(Handle handle)
Called when a transaction is started
|
void |
checkpoint(Handle handle,
String name)
Create a new checkpoint (savepoint in JDBC terminology)
|
void |
commit(Handle handle)
Called when a transaction is committed
|
<ReturnType> |
inTransaction(Handle handle,
TransactionCallback<ReturnType> callback)
Run a transaction.
|
<ReturnType> |
inTransaction(Handle handle,
TransactionIsolationLevel level,
TransactionCallback<ReturnType> callback)
Run a transaction.
|
boolean |
isInTransaction(Handle handle)
Called to test if a handle is in a transaction
|
void |
release(Handle handle,
String checkpointName)
Release a previously created checkpoint
|
void |
rollback(Handle handle)
Called when a transaction is rolled back
|
void |
rollback(Handle handle,
String name)
Roll back to a named checkpoint
|
void begin(Handle handle)
void checkpoint(Handle handle, String name)
handle
- the handle on which the transaction is being checkpointedname
- The name of the chckpoint, used to rollback to or release latevoid commit(Handle handle)
<ReturnType> ReturnType inTransaction(Handle handle, TransactionCallback<ReturnType> callback)
<ReturnType> ReturnType inTransaction(Handle handle, TransactionIsolationLevel level, TransactionCallback<ReturnType> callback)
boolean isInTransaction(Handle handle)
void release(Handle handle, String checkpointName)
handle
- the handle on which the checkpoint is being releasedcheckpointName
- the checkpoint to releasevoid rollback(Handle handle)
Copyright © 2018. All rights reserved.