org.openorb.ots.Impl

Class Terminator

public class Terminator extends TerminatorPOA

This class is the terminator interface implementation.

Author: Jerome Daniel

Constructor Summary
Terminator(POA poa, Coordinator coordinator, Logger logger)
Constructor
Method Summary
voidcommit(boolean report_heuristics)
If the transaction has not been marked rollback only, and all of the participants in the transaction agree to commit, the transaction is committed and the operation terminates normally.
voiddisableRemove()
This operation is used to disable remove
voidenableRemove()
This operation is used to disable remove
voidproceed_commit(Resource[] resources, BooleanHolder heuristicMixedHolder, BooleanHolder heuristicHazardHolder)
This operation is used to apply the second phase of the 2 Phase Commit (2PC) protocol.
voidproceed_commit_one_phase(Resource res)
This operation is used to apply a commit one phase only if one resource is registered.
voidproceed_forget()
This operation is used to send a forget to all resources that previously sent an heuristic
Voteproceed_prepare(Resource[] resources, BooleanHolder heuristicMixedHolder, BooleanHolder heuristicHazardHolder)
This operation applies the first phase of 2 Phase Commit (2PC) protocol.
voidproceed_rollback()
This operation is used to rollback a transaction.
voidproceed_rollback_after_prepare()
This operation is used to rollback a transaction after a prepare.
voidremoveItself()
This operation is used to remove this object from POA
voidrollback()
The transaction is rolled back.
voidsetTimeOutControl(TimeOutControl time)
This operation is used to set the time out control

Constructor Detail

Terminator

public Terminator(POA poa, Coordinator coordinator, Logger logger)
Constructor

Method Detail

commit

public void commit(boolean report_heuristics)
If the transaction has not been marked rollback only, and all of the participants in the transaction agree to commit, the transaction is committed and the operation terminates normally. Otherwise, the transaction is rolled back (as described below) and the TRANSACTION_ROLLEDBACK standard exception is raised. If the report_heuristics parameter is true, the Transaction Service will report inconsistent or possibly inconsistent outcomes using the HeuristicMixed and HeuristicHazard exceptions. A Transaction Service implementation may optionally use the Event Service to report heuristic decisions. The commit operation may rollback the transaction if there are subtransactions of the transaction that have not themselves been committed or rolled back or if there are existing or potential activities associated with the transaction that have not completed. The nature and extent of such error checking is implementation-dependent. When a top-level transaction is committed, all changes to recoverable objects made in the scope of this transaction are made permanent and visible to other transactions or clients. When a subtransaction is committed, the changes are made visible to other related transactions as appropriate to the degree of isolation enforced by the resources.

disableRemove

public void disableRemove()
This operation is used to disable remove

enableRemove

public void enableRemove()
This operation is used to disable remove

proceed_commit

public void proceed_commit(Resource[] resources, BooleanHolder heuristicMixedHolder, BooleanHolder heuristicHazardHolder)
This operation is used to apply the second phase of the 2 Phase Commit (2PC) protocol.

proceed_commit_one_phase

public void proceed_commit_one_phase(Resource res)
This operation is used to apply a commit one phase only if one resource is registered.

proceed_forget

public void proceed_forget()
This operation is used to send a forget to all resources that previously sent an heuristic

proceed_prepare

public Vote proceed_prepare(Resource[] resources, BooleanHolder heuristicMixedHolder, BooleanHolder heuristicHazardHolder)
This operation applies the first phase of 2 Phase Commit (2PC) protocol.

proceed_rollback

public void proceed_rollback()
This operation is used to rollback a transaction.

proceed_rollback_after_prepare

public void proceed_rollback_after_prepare()
This operation is used to rollback a transaction after a prepare.

removeItself

public void removeItself()
This operation is used to remove this object from POA

rollback

public void rollback()
The transaction is rolled back. When a transaction is rolled back, all changes to recoverable objects made in the scope of this transaction (including changes made by descendant transactions) are rolled back. All resources locked by the transaction are made available to other transactions as appropriate to the degree of isolation enforced by the resources.

setTimeOutControl

public void setTimeOutControl(TimeOutControl time)
This operation is used to set the time out control