public final class RemoteTransaction extends AbstractTransaction
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Attempt to commit this transaction.
|
boolean |
delistResource(XAResource xaRes,
int flag)
Delist an XA resource from this transaction.
|
boolean |
enlistResource(XAResource xaRes)
Enlist an XA resource with this transaction.
|
boolean |
equals(Object obj) |
<T> T |
getProviderInterface(Class<T> providerInterfaceType)
Get a provider-specific interface from this transaction.
|
int |
getStatus()
Get the status of the transaction.
|
int |
getTransactionTimeout()
Get the transaction timeout that was in force when the transaction began.
|
int |
hashCode() |
void |
registerSynchronization(Synchronization sync)
Register a
Synchronization callback with this transaction. |
void |
rollback()
Rolls back this transaction.
|
void |
setRollbackOnly()
Mark the transaction so that the only possible outcome is a rollback.
|
String |
toString() |
getEstimatedRemainingTime, performAction, performConsumer, performConsumer, performConsumer, performFunction, performFunction, performSupplier, performToIntFunction, performToIntFunction, registerAssociationListenerpublic int getTransactionTimeout()
AbstractTransactiongetTransactionTimeout in class AbstractTransactionpublic <T> T getProviderInterface(Class<T> providerInterfaceType)
AbstractTransactiongetProviderInterface in class AbstractTransactionT - the provider interface typeproviderInterfaceType - the provider interface type class (must not be null)null if the given type isn't supported by this transaction's providerpublic void commit()
throws RollbackException,
HeuristicMixedException,
HeuristicRollbackException,
SecurityException,
SystemException
Transactioncommit in interface Transactioncommit in class AbstractTransactionRollbackException - If the transaction was marked for rollback
only, the transaction is rolled back and this exception is
thrown.HeuristicMixedException - If a heuristic decision was made and
some some parts of the transaction have been committed while
other parts have been rolled back.HeuristicRollbackException - If a heuristic decision to roll
back the transaction was made.SecurityException - If the caller is not allowed to commit this
transaction.SystemException - If the transaction service fails in an
unexpected way.public void rollback()
throws IllegalStateException,
SystemException
Transactionrollback in interface Transactionrollback in class AbstractTransactionIllegalStateException - If the transaction is in a state
where it cannot be rolled back. This could be because the
transaction is no longer active, or because it is in the
prepared state.SystemException - If the transaction service fails in an
unexpected way.public void setRollbackOnly()
throws IllegalStateException,
SystemException
TransactionIllegalStateException - If the transaction is not in an active
state.SystemException - If the transaction service fails in an
unexpected way.public int getStatus()
TransactionStatus constants.public boolean enlistResource(XAResource xaRes)
Transactiontrue if the resource could be enlisted with
this transaction, otherwise false.public boolean delistResource(XAResource xaRes, int flag)
Transactiontrue if the resource could be delisted from
this transaction, otherwise false.public void registerSynchronization(Synchronization sync) throws RollbackException, IllegalStateException, SystemException
TransactionSynchronization callback with this transaction.RollbackException - If the transaction is marked for rollback
only.IllegalStateException - If the transaction is in a state
where Synchronization callbacks cannot be registered.
This could be because the transaction is no longer active,
or because it is in the
prepared state.SystemException - If the transaction service fails in an
unexpected way.Copyright © 2017 JBoss by Red Hat. All rights reserved.