org.jacorb.transaction
Class CoordinatorImpl

java.lang.Object
  extended by org.jacorb.transaction.CoordinatorImpl
All Implemented Interfaces:
Sleeper, ControlOperations, CoordinatorOperations, TerminatorOperations

public class CoordinatorImpl
extends Object
implements Sleeper, CoordinatorOperations, ControlOperations, TerminatorOperations

Instances of this class represent transactions. A single instance is used for implementing the Coordinator, Terminator and Control CORBA objects.

Author:
Nicolas Noffke, Vladimir Mencl

Method Summary
 void commit(boolean report_heuristics)
           
 Control create_subtransaction()
           
 Coordinator get_coordinator()
           
 Status get_parent_status()
           
 Status get_status()
           
 Terminator get_terminator()
           
 Status get_top_level_status()
           
 String get_transaction_name()
           
 PropagationContext get_txcontext()
           
 int hash_top_level_tran()
           
 int hash_transaction()
           
 boolean is_ancestor_transaction(Coordinator tc)
           
 boolean is_descendant_transaction(Coordinator tc)
           
 boolean is_related_transaction(Coordinator tc)
           
 boolean is_same_transaction(Coordinator tc)
           
 boolean is_top_level_transaction()
           
 RecoveryCoordinator register_resource(Resource r)
           
 void register_subtran_aware(SubtransactionAwareResource r)
           
 void register_synchronization(Synchronization sync)
           
 void rollback_only()
           
 void rollback()
           
 void wakeup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

wakeup

public void wakeup()
Specified by:
wakeup in interface Sleeper

get_status

public Status get_status()
Specified by:
get_status in interface CoordinatorOperations

get_parent_status

public Status get_parent_status()
Specified by:
get_parent_status in interface CoordinatorOperations

get_top_level_status

public Status get_top_level_status()
Specified by:
get_top_level_status in interface CoordinatorOperations

is_same_transaction

public boolean is_same_transaction(Coordinator tc)
Specified by:
is_same_transaction in interface CoordinatorOperations

is_related_transaction

public boolean is_related_transaction(Coordinator tc)
Specified by:
is_related_transaction in interface CoordinatorOperations

is_ancestor_transaction

public boolean is_ancestor_transaction(Coordinator tc)
Specified by:
is_ancestor_transaction in interface CoordinatorOperations

is_descendant_transaction

public boolean is_descendant_transaction(Coordinator tc)
Specified by:
is_descendant_transaction in interface CoordinatorOperations

is_top_level_transaction

public boolean is_top_level_transaction()
Specified by:
is_top_level_transaction in interface CoordinatorOperations

hash_transaction

public int hash_transaction()
Specified by:
hash_transaction in interface CoordinatorOperations

hash_top_level_tran

public int hash_top_level_tran()
Specified by:
hash_top_level_tran in interface CoordinatorOperations

register_resource

public RecoveryCoordinator register_resource(Resource r)
                                      throws Inactive
Specified by:
register_resource in interface CoordinatorOperations
Throws:
Inactive

register_synchronization

public void register_synchronization(Synchronization sync)
                              throws Inactive,
                                     SynchronizationUnavailable
Specified by:
register_synchronization in interface CoordinatorOperations
Throws:
Inactive
SynchronizationUnavailable

register_subtran_aware

public void register_subtran_aware(SubtransactionAwareResource r)
                            throws Inactive,
                                   NotSubtransaction
Specified by:
register_subtran_aware in interface CoordinatorOperations
Throws:
Inactive
NotSubtransaction

rollback_only

public void rollback_only()
                   throws Inactive
Specified by:
rollback_only in interface CoordinatorOperations
Throws:
Inactive

get_transaction_name

public String get_transaction_name()
Specified by:
get_transaction_name in interface CoordinatorOperations

create_subtransaction

public Control create_subtransaction()
                              throws SubtransactionsUnavailable,
                                     Inactive
Specified by:
create_subtransaction in interface CoordinatorOperations
Throws:
SubtransactionsUnavailable
Inactive

get_txcontext

public PropagationContext get_txcontext()
                                 throws Unavailable
Specified by:
get_txcontext in interface CoordinatorOperations
Throws:
Unavailable

get_terminator

public Terminator get_terminator()
                          throws Unavailable
Specified by:
get_terminator in interface ControlOperations
Throws:
Unavailable

get_coordinator

public Coordinator get_coordinator()
                            throws Unavailable
Specified by:
get_coordinator in interface ControlOperations
Throws:
Unavailable

commit

public void commit(boolean report_heuristics)
            throws HeuristicMixed,
                   HeuristicHazard
Specified by:
commit in interface TerminatorOperations
Throws:
HeuristicMixed
HeuristicHazard

rollback

public void rollback()
Specified by:
rollback in interface TerminatorOperations


Copyright © 2015 JacORB. All rights reserved.