Package org.wildfly.transaction.client
Interface XAOutflowHandle
-
public interface XAOutflowHandleA handle for the outflow of an XA transactional resource.In certain circumstances, if all outflowing transactions forget the enlistment or it is owned by another node, the transaction may be resolved at prepare directly with an
XA_RDONLYstatus, or it may be completely removed from the transaction before it completes, allowing more efficient transaction resolution as well as correct behavior in the presence of outflow cycles.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static XAOutflowHandlecreateSimple(Xid xid, int timeout)Create a simple, no-operation outflow handle.voidforgetEnlistment()Signal that this enlistment may be forgotten.intgetRemainingTime()Get an estimated remaining timeout for this transaction.XidgetXid()Get the XID of the transaction.voidnonMasterEnlistment()Signal that the peer already had the transaction in question.voidverifyEnlistment()Signal that this enlistment should be activated effective immediately.
-
-
-
Method Detail
-
getRemainingTime
int getRemainingTime()
Get an estimated remaining timeout for this transaction.- Returns:
- the timeout, in seconds (0 indicates that the timeout has likely already expired)
-
forgetEnlistment
void forgetEnlistment()
Signal that this enlistment may be forgotten.
-
nonMasterEnlistment
void nonMasterEnlistment()
Signal that the peer already had the transaction in question. It may have been created previously by this node, or by another node. When there are no outstanding handles, if the corresponding subordinate enlistment has not been verified, and this method was called at least once, then the enlistment may be assumed to be owned by someone else and subsequent outstanding handles will not prevent the transaction from completing.
-
verifyEnlistment
void verifyEnlistment() throws jakarta.transaction.RollbackException, jakarta.transaction.SystemExceptionSignal that this enlistment should be activated effective immediately. If any outflowing transactions verify the enlistment, then the enlistment is verified for all.- Throws:
jakarta.transaction.RollbackException- if the transaction was rolled back before the enlistment could be activatedjakarta.transaction.SystemException- if the enlistment failed for an unexpected reason
-
getXid
@NotNull Xid getXid()
Get the XID of the transaction.- Returns:
- the XID of the transaction (must not be
null)
-
createSimple
static XAOutflowHandle createSimple(Xid xid, int timeout)
Create a simple, no-operation outflow handle.- Parameters:
xid- the transaction ID (must not benull)timeout- the estimated remaining time, in seconds- Returns:
- the outflow handle (not
null)
-
-