|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectpt.ist.fenixframework.backend.ogm.OgmTransactionManager
public class OgmTransactionManager
| Constructor Summary | |
|---|---|
OgmTransactionManager()
|
|
| Method Summary | ||
|---|---|---|
void |
addCommitListener(CommitListener listener)
Registers a commit listener, that will be called whenever any Transaction managed by this Manager is committed. |
|
void |
begin()
|
|
void |
begin(boolean readOnly)
Create a new transaction and associate it with the current thread. |
|
void |
commit()
|
|
int |
getStatus()
|
|
Transaction |
getTransaction()
Get the Transaction object that represents the transaction
context of the calling thread. |
|
void |
removeCommitListener(CommitListener listener)
Unregisters the given commit listener. |
|
void |
resume(Transaction tx)
|
|
void |
rollback()
|
|
void |
setRollbackOnly()
|
|
void |
setTransactionTimeout(int timeout)
|
|
Transaction |
suspend()
|
|
|
withTransaction(Callable<T> command)
Transactionally execute a command, possibly returning a result. |
|
|
withTransaction(Callable<T> command,
Atomic atomic)
For now, it ignores the value of the atomic parameter. |
|
|
withTransaction(CallableWithoutException<T> command)
Transactionally execute a command, possibly returning a result. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OgmTransactionManager()
| Method Detail |
|---|
public void begin()
throws NotSupportedException,
SystemException
begin in interface TransactionManagerNotSupportedException
SystemException
public void begin(boolean readOnly)
throws NotSupportedException,
SystemException
TransactionManagertrue.
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 commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SystemException
commit in interface TransactionManagerRollbackException
HeuristicMixedException
HeuristicRollbackException
SystemExceptionpublic Transaction getTransaction()
TransactionManagerTransaction 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.
getTransaction in interface TransactionManager
public void rollback()
throws SystemException
rollback in interface TransactionManagerSystemExceptionpublic <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
command - The command to executeatomic - the configuration for the execution of this command.
Exception
public int getStatus()
throws SystemException
getStatus in interface TransactionManagerSystemException
public void resume(Transaction tx)
throws InvalidTransactionException,
IllegalStateException,
SystemException
resume in interface TransactionManagerInvalidTransactionException
IllegalStateException
SystemException
public void setRollbackOnly()
throws IllegalStateException,
SystemException
setRollbackOnly in interface TransactionManagerIllegalStateException
SystemException
public void setTransactionTimeout(int timeout)
throws SystemException
setTransactionTimeout in interface TransactionManagerSystemException
public Transaction suspend()
throws SystemException
suspend in interface TransactionManagerSystemExceptionpublic void addCommitListener(CommitListener listener)
TransactionManagerTransaction managed by this Manager is committed.
listener - The listener to be added.TransactionManager.addCommitListener(pt.ist.fenixframework.CommitListener)public void removeCommitListener(CommitListener listener)
TransactionManager
listener - The listener to be removed.TransactionManager.removeCommitListener(pt.ist.fenixframework.CommitListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||