public interface TccTransaction
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
APPLICATION_TCC_JSON
TCC coordinator endpoints media type
|
static java.lang.String |
HEADER_TCC_LINK_REL_VAL |
static java.lang.String |
HEADER_TCC_PARTICIPANT_REL_VAL |
static java.lang.String |
HEADER_TCC_TIME_LIMIT_PARAM_VAL |
Modifier and Type | Method and Description |
---|---|
void |
addTccParticipant(TccParticipant tccParticipant)
Add a participant to the current transaction
|
CancelResponse |
cancel(CancelRequest request)
Cancel the TCC transaction optionally adding additional participants
|
ConfirmResponse |
confirm(ConfirmRequest request)
Confirm the TCC transaction optionally adding additional participants
|
java.util.List<TccParticipant> |
getTccParticipants()
Get a list of participants in the current transaction
|
long |
getTimeLimit()
Get the time limit in milliseconds for the current transaction
|
java.lang.String |
getTransactionId()
Get the current transaction id
|
TccTransactionState |
getTransactionState()
Get the TCC transaction state
|
java.lang.String |
getTransactionUrl()
Get the current transaction internal url
|
void |
setTimeLimit(long timeLimit)
Set the time limit in milliseconds for the current transaction
|
static final java.lang.String APPLICATION_TCC_JSON
static final java.lang.String HEADER_TCC_LINK_REL_VAL
static final java.lang.String HEADER_TCC_PARTICIPANT_REL_VAL
static final java.lang.String HEADER_TCC_TIME_LIMIT_PARAM_VAL
java.lang.String getTransactionUrl()
java.lang.String getTransactionId()
ConfirmResponse confirm(ConfirmRequest request) throws TccException, TccUnknownTransactionException, TccHeuristicException
This asks the transaction coordinator to confirm all the participants in the transaction including those added by this call.
request
- optional list of TccParticipants to be included in the confirmation of the transactionTccException
- some failure occurred communicating with the transaction coordinatorTccUnknownTransactionException
- transaction not found or unknown error at coordinator sideTccHeuristicException
- not all the participants confirmedCancelResponse cancel(CancelRequest request) throws TccException, TccUnknownTransactionException, TccHeuristicException
This asks the transaction coordinator to cancel all the participants in the transaction including those added by this call.
request
- optional list of TccParticipants to be included in the cancelling of the transactionTccException
- some failure occurred communicating with the transaction coordinatorTccUnknownTransactionException
- transaction not found or unknown error at coordinator sideTccHeuristicException
- not all the participants cancelledTccTransactionState getTransactionState() throws TccException, TccUnknownTransactionException
This asks the transaction coordinator to return the status of the transaction along with participant status
TccException
- some failure occurred communicating with the transaction coordinatorTccUnknownTransactionException
- transaction not found or unknown error at coordinator sidevoid addTccParticipant(TccParticipant tccParticipant)
tccParticipant
- TCC participant to be included in the transaction associated to the current threadjava.util.List<TccParticipant> getTccParticipants()
void setTimeLimit(long timeLimit)
timeLimit
- time limit in millisecondslong getTimeLimit()
Copyright © 2022, Oracle and/or its affiliates.