|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.ist.fenixframework.backend.jvstmmem.JVSTMMemTransactionManager
public class JVSTMMemTransactionManager
Constructor Summary | |
---|---|
JVSTMMemTransactionManager()
|
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)
Transactionally execute a command, possibly returning a result. |
|
|
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 JVSTMMemTransactionManager()
Method Detail |
---|
public void begin()
begin
in interface TransactionManager
public void begin(boolean readOnly)
TransactionManager
true
.
public void commit()
commit
in interface TransactionManager
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.
getTransaction
in interface TransactionManager
public int getStatus() throws SystemException
getStatus
in interface TransactionManager
SystemException
public void resume(Transaction tx) throws InvalidTransactionException, IllegalStateException, SystemException
resume
in interface TransactionManager
InvalidTransactionException
IllegalStateException
SystemException
public void setRollbackOnly() throws IllegalStateException, SystemException
setRollbackOnly
in interface TransactionManager
IllegalStateException
SystemException
public void setTransactionTimeout(int timeout) throws SystemException
setTransactionTimeout
in interface TransactionManager
SystemException
public Transaction suspend() throws SystemException
suspend
in interface TransactionManager
SystemException
public void rollback()
rollback
in interface TransactionManager
public <T> T withTransaction(Callable<T> command)
TransactionManager
#withTransaction(Callable, Atomic)
with a default atomic behaviour.
command
- The command to execute.public <T> T withTransaction(Callable<T> command, Atomic atomic)
TransactionManager
command
- The command to executeatomic
- the configuration for the execution of this command.public <T> T withTransaction(CallableWithoutException<T> command)
TransactionManager
#withTransaction(Callable, Atomic)
with a default atomic behaviour.
command
- The command to execute.public void addCommitListener(CommitListener listener)
TransactionManager
Transaction
managed by this Manager is committed.
listener
- The listener to be added.public void removeCommitListener(CommitListener listener)
TransactionManager
listener
- The listener to be removed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |