public class DurableTwoPhaseCommitParticipant extends Object implements Participant
Constructor and Description |
---|
DurableTwoPhaseCommitParticipant() |
DurableTwoPhaseCommitParticipant(Durable2PCParticipant resource,
String identifier) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
attempt to cancel the participant
|
void |
confirm()
attempt to commit the participant
|
void |
confirmOnePhase()
Confirm the participant in a single phase.
|
void |
forget()
Inform the participant that is can forget the heuristic result.
|
String |
id() |
Vote |
prepare()
tell the participant to prepare
|
boolean |
restore_state(com.arjuna.ats.arjuna.state.InputObjectState os) |
boolean |
save_state(com.arjuna.ats.arjuna.state.OutputObjectState os) |
void |
unknown() |
public DurableTwoPhaseCommitParticipant()
public DurableTwoPhaseCommitParticipant(Durable2PCParticipant resource, String identifier)
public Vote prepare() throws InvalidParticipantException, WrongStateException, HeuristicHazardException, HeuristicMixedException, SystemException
prepare
in interface Participant
InvalidParticipantException
- Thrown if the participant identity is invalid
(e.g., refers to an unknown participant.)WrongStateException
- Thrown if the state of the participant is such that
it cannot prepare.HeuristicHazardException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean it cannot determine what the result of issuing prepare
to them has been.HeuristicMixedException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean some of them cancelled and some of them confirmed.SystemException
- Thrown if some other error occurred.public void confirm() throws InvalidParticipantException, WrongStateException, HeuristicHazardException, HeuristicMixedException, HeuristicCancelException, SystemException
confirm
in interface Participant
InvalidParticipantException
- Thrown if the participant identity is invalid
(e.g., refers to an unknown participant.)WrongStateException
- Thrown if the state of the participant is such that
it cannot confirm.HeuristicHazardException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean it cannot determine what the result of issuing confirm
to them has been.HeuristicMixedException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean some of them cancelled and some of them confirmed.HeuristicCancelException
- Thrown if the participant rolls
back rather than commits.SystemException
- Thrown if some other error occurred.public void cancel() throws InvalidParticipantException, WrongStateException, HeuristicHazardException, HeuristicMixedException, HeuristicConfirmException, SystemException
cancel
in interface Participant
InvalidParticipantException
- Thrown if the participant identity is invalid
(e.g., refers to an unknown participant.)WrongStateException
- Thrown if the state of the participant is such that
it cannot cancel.HeuristicHazardException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean it cannot determine what the result of issuing cancel
to them has been.HeuristicMixedException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean some of them cancelled and some of them confirmed.HeuristicConfirmException
- Thrown if the participant commits
rather than rolls back.SystemException
- Thrown if some other error occurred.public void confirmOnePhase() throws InvalidParticipantException, WrongStateException, HeuristicHazardException, HeuristicMixedException, HeuristicCancelException, SystemException
Participant
confirmOnePhase
in interface Participant
InvalidParticipantException
- Thrown if the participant identity is invalid
(e.g., refers to an unknown participant.)WrongStateException
- Thrown if the state of the participant is such that
it cannot cancel.HeuristicHazardException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean it cannot determine what the result of issuing cancel
to them has been.HeuristicMixedException
- Thrown if upon preparing, the participant finds that
some of its enlisted participants have return statuses which
mean some of them cancelled and some of them confirmed.HeuristicCancelException
- Thrown if the participant rolls
back rather than commit.SystemException
- Thrown if some other error occurred.public void forget() throws InvalidParticipantException, WrongStateException, SystemException
Participant
forget
in interface Participant
InvalidParticipantException
- Thrown if the participant identity is invalid.WrongStateException
- Thrown if the participant is in an invalid state.SystemException
- Thrown in the event of a general fault.public void unknown() throws SystemException
SystemException
public String id() throws SystemException
id
in interface Participant
SystemException
public boolean save_state(com.arjuna.ats.arjuna.state.OutputObjectState os)
save_state
in interface Participant
public boolean restore_state(com.arjuna.ats.arjuna.state.InputObjectState os)
restore_state
in interface Participant
Copyright © 2019 JBoss by Red Hat. All rights reserved.