public class CMTTransactionHandler extends Object implements TransactionHandler
| Constructor and Description |
|---|
CMTTransactionHandler() |
| 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
Will throw a RuntimeException to force transactional rollback
|
void |
rollback(Handle handle,
String name)
Roll back to a named checkpoint
|
public void begin(Handle handle)
begin in interface TransactionHandlerpublic void checkpoint(Handle handle, String name)
checkpoint in interface TransactionHandlerhandle - the handle on which the transaction is being checkpointedname - The name of the chckpoint, used to rollback to or release latepublic void commit(Handle handle)
commit in interface TransactionHandlerpublic <ReturnType> ReturnType inTransaction(Handle handle, TransactionCallback<ReturnType> callback)
TransactionHandlerinTransaction in interface TransactionHandlerHandle.inTransaction(TransactionCallback)public <ReturnType> ReturnType inTransaction(Handle handle, TransactionIsolationLevel level, TransactionCallback<ReturnType> callback)
TransactionHandlerinTransaction in interface TransactionHandlerHandle.inTransaction(TransactionIsolationLevel, TransactionCallback)public boolean isInTransaction(Handle handle)
isInTransaction in interface TransactionHandlerpublic void release(Handle handle, String checkpointName)
release in interface TransactionHandlerhandle - the handle on which the checkpoint is being releasedcheckpointName - the checkpoint to releasepublic void rollback(Handle handle)
rollback in interface TransactionHandlerpublic void rollback(Handle handle, String name)
rollback in interface TransactionHandlerhandle - the handle the rollback is being performed onname - the name of the checkpoint to rollback toCopyright © 2018. All rights reserved.