|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.omg.PortableServer.Servant
com.sun.jts.codegen.otsidl.JCoordinatorPOA
com.sun.jts.CosTransactions.TopCoordinator
public class TopCoordinator
The TopCoordinator interface is our implementation of the standard Coordinator interface that is used for top-level transactions. It allows Resources to be registered for participation in a top-level transaction. In addition the TopCoordinator recovery interface can be used if the connection to a superior Coordinator is lost after a transaction is prepared. As an instance of this class may be accessed from multiple threads within a process, serialisation for thread-safety is necessary in the implementation. The information managed should be reconstructible in the case of a failure.
,
Serialized Form| Method Summary | |
|---|---|
org.omg.CORBA.Request |
_create_request(org.omg.CORBA.Context ctx,
java.lang.String operation,
org.omg.CORBA.NVList arg_list,
org.omg.CORBA.NamedValue result)
|
org.omg.CORBA.Request |
_create_request(org.omg.CORBA.Context ctx,
java.lang.String operation,
org.omg.CORBA.NVList arg_list,
org.omg.CORBA.NamedValue result,
org.omg.CORBA.ExceptionList exceptions,
org.omg.CORBA.ContextList contexts)
|
org.omg.CORBA.Object |
_duplicate()
|
org.omg.CORBA.DomainManager[] |
_get_domain_managers()
|
org.omg.CORBA.Object |
_get_interface_def()
|
org.omg.CORBA.Policy |
_get_policy(int policy_type)
|
int |
_hash(int maximum)
|
boolean |
_is_a(java.lang.String repository_id)
|
boolean |
_is_equivalent(org.omg.CORBA.Object that)
|
boolean |
_non_existent()
|
void |
_release()
|
org.omg.CORBA.Request |
_request(java.lang.String operation)
|
org.omg.CORBA.Object |
_set_policy_override(org.omg.CORBA.Policy[] policies,
org.omg.CORBA.SetOverrideType set_add)
|
org.omg.CosTransactions.Control |
create_subtransaction()
Creates a subtransaction and returns a Control object that represents the child transaction. |
void |
doFinalize()
Cleans up the objects state. |
boolean |
equals(java.lang.Object other)
Determines equality of the object with the parameter. |
org.omg.CosTransactions.Status |
get_parent_status()
Gets the local state of the transaction. |
org.omg.CosTransactions.Status |
get_status()
Returns the local status of the target transaction. |
org.omg.CosTransactions.Status |
get_top_level_status()
Gets the local state of the transaction. |
java.lang.String |
get_transaction_name()
removed synchronization at method level since only tranState requires locking |
org.omg.CosTransactions.PropagationContext |
get_txcontext()
Creates a PropagationContext which contains the information which would normally be passed implicitly via the CosTSPropagation interfaces. |
org.omg.CosTransactions.TransIdentity[] |
getAncestors()
Returns the sequence of ancestors of the transaction. |
GlobalTID |
getGlobalTid()
|
org.omg.CosTransactions.otid_t |
getGlobalTID()
Returns a global identifier that represents the TopCoordinator's transaction. |
long |
getLocalTID()
Returns the internal identifier for the transaction. |
int |
getParticipantCount()
|
int |
hash_top_level_tran()
Returns a hash value based on the top-level ancestor of the transaction associated with the target object. |
int |
hash_transaction()
removed synchronization at method level since only tranState requires locking |
int |
hashCode()
Returns a hash code for the object. |
boolean |
is_ancestor_transaction(org.omg.CosTransactions.Coordinator other)
Determines whether the target TopCoordinator is an ancestor of the given Coordinator. |
boolean |
is_descendant_transaction(org.omg.CosTransactions.Coordinator other)
Determines whether the target TopCoordinator is a descendant of the given Coordinator. |
boolean |
is_related_transaction(org.omg.CosTransactions.Coordinator other)
Determines whether the target TopCoordinator is related to the given Coordinator (i.e. |
boolean |
is_root_transaction()
Determines whether this TopCoordinator is the root TopCoordinator. |
boolean |
is_same_transaction(org.omg.CosTransactions.Coordinator other)
removed synchronization at method level since only tranState requires locking |
boolean |
is_top_level_transaction()
Determines whether the target TopCoordinator represents a top-level (non-nested) transaction. |
boolean |
isRollbackOnly()
Checks whether the TopCoordinator is marked rollback-only. |
org.omg.CosTransactions.RecoveryCoordinator |
register_resource(org.omg.CosTransactions.Resource res)
Enables a Resource to be registered as a participant in the completion of the top-level transaction represented by the TopCoordinator. |
void |
register_subtran_aware(org.omg.CosTransactions.SubtransactionAwareResource sares)
Enables a SubtransactionAwareResource to be registered as a participant in the completion of a subtransaction. |
void |
register_synchronization(org.omg.CosTransactions.Synchronization sync)
Informs the TopCoordinator that the given object requires synchronization before and after completion of the transaction. |
void |
rollback_only()
Ensures that the transaction represented by the target TopCoordinator cannot be committed. |
| Methods inherited from class com.sun.jts.codegen.otsidl.JCoordinatorPOA |
|---|
_all_interfaces, _invoke, _this, _this |
| Methods inherited from class org.omg.PortableServer.Servant |
|---|
_default_POA, _get_delegate, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void doFinalize()
- public org.omg.CosTransactions.Status get_status()
get_status in interface org.omg.CosTransactions.CoordinatorOperations -
public org.omg.CosTransactions.Status get_parent_status()
get_parent_status in interface org.omg.CosTransactions.CoordinatorOperations -
public org.omg.CosTransactions.Status get_top_level_status()
get_top_level_status in interface org.omg.CosTransactions.CoordinatorOperations -
public boolean is_same_transaction(org.omg.CosTransactions.Coordinator other)
throws org.omg.CORBA.SystemException
is_same_transaction in interface org.omg.CosTransactions.CoordinatorOperationsorg.omg.CORBA.SystemException
public boolean is_related_transaction(org.omg.CosTransactions.Coordinator other)
throws org.omg.CORBA.SystemException
is_related_transaction in interface org.omg.CosTransactions.CoordinatorOperationsother - The other Coordinator.
org.omg.CORBA.SystemException - The other Coordinator could not be reached.public boolean is_root_transaction()
public boolean is_ancestor_transaction(org.omg.CosTransactions.Coordinator other)
throws org.omg.CORBA.SystemException
is_ancestor_transaction in interface org.omg.CosTransactions.CoordinatorOperationsother - The other Coordinator.
org.omg.CORBA.SystemException - The other Coordinator could not be reached.
public boolean is_descendant_transaction(org.omg.CosTransactions.Coordinator other)
throws org.omg.CORBA.SystemException
is_descendant_transaction in interface org.omg.CosTransactions.CoordinatorOperationsother - The other Coordinator.
org.omg.CORBA.SystemException - The other Coordinator could not be reached.public boolean is_top_level_transaction()
For a top-level transaction returns TRUE.
This operation references no instance variables and so can be implemented locally in a proxy class.
is_top_level_transaction in interface org.omg.CosTransactions.CoordinatorOperations -
public int hash_transaction()
hash_transaction in interface org.omg.CosTransactions.CoordinatorOperationspublic int hash_top_level_tran()
hash_top_level_tran in interface org.omg.CosTransactions.CoordinatorOperations -
public org.omg.CosTransactions.RecoveryCoordinator register_resource(org.omg.CosTransactions.Resource res)
throws org.omg.CosTransactions.Inactive,
org.omg.CORBA.TRANSACTION_ROLLEDBACK
register_resource in interface org.omg.CosTransactions.CoordinatorOperationsres - The Resource to be registered.
org.omg.CosTransactions.Inactive - The Coordinator is completing the transaction and
cannot accept this registration.
org.omg.CORBA.TRANSACTION_ROLLEDBACK - The transaction which the Coordinator
represents has already been rolled back, or has been marked
rollback-only.
public void register_subtran_aware(org.omg.CosTransactions.SubtransactionAwareResource sares)
throws org.omg.CosTransactions.NotSubtransaction
register_subtran_aware in interface org.omg.CosTransactions.CoordinatorOperationssares - The SubtransactionAwareResource to be registered.
org.omg.CosTransactions.NotSubtransaction - The Coordinator represents a top-level
transaction and cannot accept the registration.
public void rollback_only()
throws org.omg.CosTransactions.Inactive
rollback_only in interface org.omg.CosTransactions.CoordinatorOperations -
org.omg.CosTransactions.Inactive - The Coordinator is already completing the
transaction.public java.lang.String get_transaction_name()
get_transaction_name in interface org.omg.CosTransactions.CoordinatorOperations
public org.omg.CosTransactions.Control create_subtransaction()
throws org.omg.CosTransactions.Inactive
create_subtransaction in interface org.omg.CosTransactions.CoordinatorOperations -
org.omg.CosTransactions.Inactive - The Coordinator is completing the subtransaction
and cannot create a new child.public org.omg.CosTransactions.otid_t getGlobalTID()
This operation references only the global identifier, and so can be implemented locally in a proxy class.
This method is currently not synchronized because that causes a deadlock in resync. I don't think this is a problem as the global identifier is allocated in the constructor and then never changes.
getGlobalTID in interface JCoordinatorOperations -
public GlobalTID getGlobalTid()
public int getParticipantCount()
public long getLocalTID()
getLocalTID in interface JCoordinatorOperations -
public boolean isRollbackOnly()
isRollbackOnly in interface JCoordinatorOperations -
public org.omg.CosTransactions.TransIdentity[] getAncestors()
getAncestors in interface JCoordinatorOperations -
public void register_synchronization(org.omg.CosTransactions.Synchronization sync)
throws org.omg.CORBA.SystemException,
org.omg.CosTransactions.Inactive,
org.omg.CosTransactions.SynchronizationUnavailable
register_synchronization in interface org.omg.CosTransactions.CoordinatorOperationssync - The Synchronization object to be registered.
org.omg.CosTransactions.Inactive - The Coordinator is in the process of completing the
transaction and cannot accept this registration.
org.omg.CosTransactions.SynchronizationUnavailable - The transaction service
cannot support synchronization.
org.omg.CORBA.SystemException - The operation failed.
public org.omg.CosTransactions.PropagationContext get_txcontext()
throws org.omg.CosTransactions.Unavailable
get_txcontext in interface org.omg.CosTransactions.CoordinatorOperations -
org.omg.CosTransactions.Inactive - The Coordinator is in the process of completing the
transaction and cannot return the information.
org.omg.CosTransactions.Unavailablepublic int hashCode()
This very basic method is used by the trace facility and should not call any method which is traced.
hashCode in class java.lang.Object -
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - The other object.
public org.omg.CORBA.Object _duplicate()
_duplicate in interface org.omg.CORBA.Objectpublic void _release()
_release in interface org.omg.CORBA.Objectpublic boolean _is_a(java.lang.String repository_id)
_is_a in interface org.omg.CORBA.Object_is_a in class org.omg.PortableServer.Servantpublic boolean _is_equivalent(org.omg.CORBA.Object that)
_is_equivalent in interface org.omg.CORBA.Objectpublic boolean _non_existent()
_non_existent in interface org.omg.CORBA.Object_non_existent in class org.omg.PortableServer.Servantpublic int _hash(int maximum)
_hash in interface org.omg.CORBA.Objectpublic org.omg.CORBA.Request _request(java.lang.String operation)
_request in interface org.omg.CORBA.Object
public org.omg.CORBA.Request _create_request(org.omg.CORBA.Context ctx,
java.lang.String operation,
org.omg.CORBA.NVList arg_list,
org.omg.CORBA.NamedValue result)
_create_request in interface org.omg.CORBA.Object
public org.omg.CORBA.Request _create_request(org.omg.CORBA.Context ctx,
java.lang.String operation,
org.omg.CORBA.NVList arg_list,
org.omg.CORBA.NamedValue result,
org.omg.CORBA.ExceptionList exceptions,
org.omg.CORBA.ContextList contexts)
_create_request in interface org.omg.CORBA.Objectpublic org.omg.CORBA.Object _get_interface_def()
_get_interface_def in interface org.omg.CORBA.Object_get_interface_def in class org.omg.PortableServer.Servantpublic org.omg.CORBA.Policy _get_policy(int policy_type)
_get_policy in interface org.omg.CORBA.Objectpublic org.omg.CORBA.DomainManager[] _get_domain_managers()
_get_domain_managers in interface org.omg.CORBA.Object
public org.omg.CORBA.Object _set_policy_override(org.omg.CORBA.Policy[] policies,
org.omg.CORBA.SetOverrideType set_add)
_set_policy_override in interface org.omg.CORBA.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||