com.arjuna.mw.wscf.model.twophase.participants
Interface Participant


public interface Participant

This is the interface that all two-phase aware participants must define.

Since:
1.0.
Version:
$Id: Participant.java,v 1.3 2005/05/19 12:13:26 nmcl Exp $
Author:
Mark Little (mark.little@arjuna.com)

Method Summary
 void cancel()
          Cancel the participant at top-level.
 void confirm()
          Confirm the participant at top-level.
 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()
          Prepare the participant for top-level.
 boolean restore_state(com.arjuna.ats.arjuna.state.InputObjectState os)
           
 boolean save_state(com.arjuna.ats.arjuna.state.OutputObjectState os)
           
 

Method Detail

prepare

Vote prepare()
             throws InvalidParticipantException,
                    WrongStateException,
                    HeuristicHazardException,
                    HeuristicMixedException,
                    SystemException
Prepare the participant for top-level.

Returns:
the vote.
Throws:
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.

confirm

void confirm()
             throws InvalidParticipantException,
                    WrongStateException,
                    HeuristicHazardException,
                    HeuristicMixedException,
                    HeuristicCancelException,
                    SystemException
Confirm the participant at top-level.

Throws:
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.
HeuristicRollbackException - Thrown if the participant rolls back rather than commits.
SystemException - Thrown if some other error occurred.
HeuristicCancelException

cancel

void cancel()
            throws InvalidParticipantException,
                   WrongStateException,
                   HeuristicHazardException,
                   HeuristicMixedException,
                   HeuristicConfirmException,
                   SystemException
Cancel the participant at top-level.

Throws:
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.
HeuristicCommitException - Thrown if the participant commits rather than rolls back.
SystemException - Thrown if some other error occurred.
HeuristicConfirmException

confirmOnePhase

void confirmOnePhase()
                     throws InvalidParticipantException,
                            WrongStateException,
                            HeuristicHazardException,
                            HeuristicMixedException,
                            HeuristicCancelException,
                            SystemException
Confirm the participant in a single phase.

Throws:
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.
HeuristicRollbackException - Thrown if the participant rolls back rather than commit.
SystemException - Thrown if some other error occurred.
HeuristicCancelException

forget

void forget()
            throws InvalidParticipantException,
                   WrongStateException,
                   SystemException
Inform the participant that is can forget the heuristic result.

Throws:
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.

id

String id()
          throws SystemException
Throws:
SystemException

save_state

boolean save_state(com.arjuna.ats.arjuna.state.OutputObjectState os)

restore_state

boolean restore_state(com.arjuna.ats.arjuna.state.InputObjectState os)


Copyright © 2012. All Rights Reserved.