Interface RemoteTransactionPeer

    • Method Detail

      • lookupXid

        @NotNull
        SubordinateTransactionControl lookupXid​(Xid xid)
                                         throws XAException
        Look up an outflow handle for a remote transaction with the given XID. The remote transaction is only looked up; no remote action should take place as a result of this call beyond correlating the XID in a protocol-specific manner. The given XID should only be examined for the global transaction ID; the branch ID should be ignored (and will usually be empty in any event).
        Parameters:
        xid - the transaction ID
        Returns:
        the handle for the remote transaction
        Throws:
        XAException - if the lookup failed for some reason
      • recover

        @NotNull
        Xid[] recover​(int flag,
                      String parentName)
               throws XAException
        Acquire a list of all unresolved subordinate transactions from the location associated with this provider.
        Parameters:
        flag - the recovery flag
        parentName - the parent node name
        Returns:
        the (possibly empty) XID array
        Throws:
        XAException - if an error occurs
      • begin

        @NotNull
        SimpleTransactionControl begin​(int timeout)
                                throws SystemException
        Establish a remote user-controlled transaction without local enlistment.
        Parameters:
        timeout - the timeout of the transaction in seconds
        Returns:
        the transaction handle (must not be null)
        Throws:
        SystemException - if an unexpected error occurs
      • getProviderInterface

        default <T> T getProviderInterface​(Class<T> clazz)
        Get the provider interface with the given type for this peer.
        Type Parameters:
        T - the provider interface type
        Parameters:
        clazz - the provider interface type class (must not be null)
        Returns:
        the provider interface with the given type, or null if no such interface is supported