public interface SRAApi
| Modifier and Type | Method and Description |
|---|---|
SRAInfo |
beginTransaction(Long timeout,
TimeUnit unit)
Begin a new SRA.
|
SRAInfo |
cancelTransaction(String txId)
Cancel a SRA
|
SRAInfo |
commitTransaction(String txId)
Commit a SRA
|
javax.ws.rs.core.Response |
deleteParticipant(String enlistmentId)
Performing DELETE on participant's recovery URL removes participant from the transaction.
|
javax.ws.rs.core.Response |
enlistParticipant(String linkHeader,
String txId,
String content)
Register a participant in a tx
|
javax.ws.rs.core.Response |
enlistVolatileParticipant(String linkHeader,
String txId)
Register a volatile participant in a tx
|
List<SRAInfo> |
getAllTransactions()
List of all transaction URIs known to the coordinator (active and in recovery)
|
javax.ws.rs.core.Response |
getTransactionExtStatus(String id)
Performing a GET on the transaction URL with media type application/txstatusext+xml
returns extended information about the transaction, such as its status,
number of participants, and their individual URIs.
|
TransactionManagerElement |
getTransactionManagerInfo()
Return extended information about the transaction-manager resource such as how long it has
been up and all transaction-coordinator URIs.
|
TransactionStatisticsElement |
getTransactionStatistics()
Return statistics for the transaction manager:
number of active, prepared, committed, and aborted transactions are returned.
|
String |
getTransactionStatus(String id)
Get the current status for a transaction
|
SRAInfo |
getTransactionURIs(String id)
Obtain the transaction terminator and participant enlistment URIs for the
specified transaction id.
|
javax.ws.rs.core.Response |
lookupParticipant(String txId,
String enlistmentId)
Get the participant url (registered during enlistParticipant) corresponding to a resource reference
if the coordinator crashes - the participant list will be empty but this is ok if commit hasn't been
called since the TM uses presumed abort semantics.
|
javax.ws.rs.core.Response |
postParticipant(String enlistmentId) |
javax.ws.rs.core.Response |
replaceParticipant(String linkHeader,
String txId,
String enlistmentId)
PUT /recovery-coordinator/_RecCoordId_/_new participant URL_ -
overwrite the old participant URL with new participant URL
(as with JTS, this will also trigger off a recovery attempt on the associated transaction)
A participant may use this url to notifiy the coordinator that he has moved to a new location.
|
List<SRAInfo> getAllTransactions()
TransactionManagerElement getTransactionManagerInfo()
TransactionStatisticsElement getTransactionStatistics()
SRAInfo getTransactionURIs(String id)
id - URL template parameter for the transaction idString getTransactionStatus(String id)
id - the id of the transactionjavax.ws.rs.core.Response getTransactionExtStatus(String id)
id - the id of the transactionSRAInfo beginTransaction(Long timeout, TimeUnit unit) throws GenericSRAException
timeout - the number of milliseconds after which the transaction is eligible for being timed out.GenericSRAExceptionSRAInfo commitTransaction(String txId)
txId - id of the SRA to commitSRAInfo cancelTransaction(String txId)
txId - id of the SRA to canceljavax.ws.rs.core.Response enlistParticipant(String linkHeader, String txId, String content)
linkHeader - link headertxId - id of transactioncontent - body of request containing URI for driving the participant through completion
(the URI should be unique within the scope of txId)javax.ws.rs.core.Response enlistVolatileParticipant(String linkHeader, String txId)
linkHeader - link headertxId - id of transactionjavax.ws.rs.core.Response lookupParticipant(String txId, String enlistmentId)
txId - transaction id that this recovery url belongs toenlistmentId - the resource referencejavax.ws.rs.core.Response replaceParticipant(String linkHeader, String txId, String enlistmentId)
linkHeader - link header containing participant linkstxId - transaction id that this recovery url belongs toenlistmentId - id by the participant is knownjavax.ws.rs.core.Response postParticipant(String enlistmentId)
javax.ws.rs.core.Response deleteParticipant(String enlistmentId)
enlistmentId - The resource referenceCopyright © 2021 JBoss by Red Hat. All rights reserved.