public class DefaultTransactionContext extends Object implements HGTransactionContext
A default implementation of HGTransactionContext
using a stack of currently
active transactions. Transactions in the stack are in a parent-child relationship where
the bottom doesn't have any parent.
Constructor and Description |
---|
DefaultTransactionContext(HGTransactionManager manager) |
Modifier and Type | Method and Description |
---|---|
void |
beginTransaction(HGTransactionConfig config) |
void |
endAll(boolean success) |
void |
endTransaction(boolean success) |
HGTransaction |
getCurrent()
Return the currently active transaction or
null if there is
no such transaction. |
HGTransactionManager |
getManager() |
public DefaultTransactionContext(HGTransactionManager manager)
public HGTransactionManager getManager()
getManager
in interface HGTransactionContext
public HGTransaction getCurrent()
Return the currently active transaction or null
if there is
no such transaction.
getCurrent
in interface HGTransactionContext
public void beginTransaction(HGTransactionConfig config)
beginTransaction
in interface HGTransactionContext
public void endTransaction(boolean success) throws HGTransactionException
endTransaction
in interface HGTransactionContext
HGTransactionException
public void endAll(boolean success) throws HGTransactionException
endAll
in interface HGTransactionContext
HGTransactionException
Copyright © 2015. All rights reserved.