|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.ist.fenixframework.core.AbstractTransactionManager pt.ist.fenixframework.backend.mem.MemTransactionManager
public class MemTransactionManager
Constructor Summary | |
---|---|
MemTransactionManager()
|
Method Summary | ||
---|---|---|
protected void |
backendCommit()
|
|
protected void |
backendRollback()
|
|
void |
begin(boolean readOnly)
Create a new transaction and associate it with the current thread. |
|
Transaction |
getTransaction()
Get the Transaction object that represents the transaction
context of the calling thread. |
|
void |
resume(Transaction tobj)
|
|
void |
setTransactionTimeout(int seconds)
|
|
Transaction |
suspend()
|
|
|
withTransaction(Callable<T> command)
Transactionally execute a command, possibly returning a result. |
|
|
withTransaction(Callable<T> command,
Atomic atomic)
Transactionally execute a command, possibly returning a result. |
|
|
withTransaction(CallableWithoutException<T> command)
Transactionally execute a command, possibly returning a result. |
Methods inherited from class pt.ist.fenixframework.core.AbstractTransactionManager |
---|
addCommitListener, begin, commit, getStatus, removeCommitListener, rollback, setRollbackOnly |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemTransactionManager()
Method Detail |
---|
public Transaction getTransaction()
TransactionManager
Transaction
object that represents the transaction
context of the calling thread.
Subsequent calls to this method, while in the scope of a given
transaction, will always return the same instance.
public <T> T withTransaction(CallableWithoutException<T> command)
TransactionManager
#withTransaction(Callable, Atomic)
with a default atomic behaviour.
command
- The command to execute.public <T> T withTransaction(Callable<T> command) throws Exception
TransactionManager
#withTransaction(Callable, Atomic)
with a default atomic behaviour.
command
- The command to execute.
Exception
public <T> T withTransaction(Callable<T> command, Atomic atomic) throws Exception
TransactionManager
command
- The command to executeatomic
- the configuration for the execution of this command.
Exception
public void begin(boolean readOnly) throws NotSupportedException, SystemException
TransactionManager
true
.
NotSupportedException
- Thrown if the thread is already associated with a transaction
and the Transaction Manager implementation does not support
nested transactions.
SystemException
- Thrown if the transaction manager encounters an unexpected
error condition that prevents future transaction services
from proceeding.public void resume(Transaction tobj) throws InvalidTransactionException, IllegalStateException, SystemException
InvalidTransactionException
IllegalStateException
SystemException
public void setTransactionTimeout(int seconds) throws SystemException
SystemException
public Transaction suspend() throws SystemException
SystemException
protected void backendCommit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException
backendCommit
in class AbstractTransactionManager
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException
protected void backendRollback() throws SecurityException, SystemException
backendRollback
in class AbstractTransactionManager
SecurityException
SystemException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |