|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.ist.fenixframework.backend.infinispan.InfinispanTransactionManager
public class InfinispanTransactionManager
Constructor Summary | |
---|---|
InfinispanTransactionManager()
|
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 InfinispanTransactionManager()
Method Detail |
---|
public void begin() throws NotSupportedException, SystemException
begin
in interface TransactionManager
NotSupportedException
SystemException
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 commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SystemException
commit
in interface TransactionManager
RollbackException
HeuristicMixedException
HeuristicRollbackException
SystemException
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 void rollback() throws SystemException
rollback
in interface TransactionManager
SystemException
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
command
- The command to executeatomic
- the configuration for the execution of this command.
Exception
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 addCommitListener(CommitListener listener)
TransactionManager
Transaction
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 |