public class ControlImpl extends javax.rmi.PortableRemoteObject implements Control, Resource, Coordinator, Terminator, RecoveryCoordinator, TimerEventListener
TransactionFactory
VOTE_COMMIT, VOTE_READONLY, VOTE_ROLLBACK
Modifier and Type | Method and Description |
---|---|
void |
commit_one_phase()
Sub-coordinator received commit_one_phase from its superior.
|
void |
commit()
Sub-coordinator received commit from its superior.
|
void |
commit(boolean report_heuristics)
Commits this transaction
|
void |
forget()
forget transaction
|
Coordinator |
get_coordinator()
Gets the Coordinator object for this transaction
|
int |
get_status()
Gets the current status of this transaction
|
Terminator |
get_terminator()
Gets the Terminator object for this transaction
|
java.lang.String |
get_transaction_name()
Gets a String that represents the transaction name.
|
boolean |
is_same_transaction(Coordinator tc)
Tests if the given coordinator represents this transaction
|
int |
prepare()
Sub-coordinator has received prepare from its superior.
|
RecoveryCoordinator |
register_resource(Resource res)
Registers a Resource object for this transaction
|
void |
register_synchronization(RemoteSynchro sync)
Registers a Synchronization object for this transaction
|
int |
replay_completion(Resource res)
Asks the status of this transaction, after recovery of a Resource
|
void |
rollback_only()
Asks to rollback the transaction
|
void |
rollback()
Rolls back this transaction branch.
|
void |
timeoutExpired(java.lang.Object arg)
The transaction timeout has expired
Do not synchronize this method to avoid deadlocks!
|
public Terminator get_terminator() throws java.rmi.RemoteException
get_terminator
in interface Control
java.rmi.RemoteException
- if a remote exception occurspublic Coordinator get_coordinator() throws java.rmi.RemoteException
get_coordinator
in interface Control
java.rmi.RemoteException
- if a remote exception occurspublic int get_status() throws java.rmi.RemoteException
get_status
in interface Coordinator
java.rmi.RemoteException
- if a remote exception occurspublic boolean is_same_transaction(Coordinator tc) throws java.rmi.RemoteException
is_same_transaction
in interface Coordinator
tc
- Coordinator to be compared to this transactionjava.rmi.RemoteException
- if a remote exception occurspublic RecoveryCoordinator register_resource(Resource res) throws java.rmi.RemoteException
register_resource
in interface Coordinator
res
- Resource to be registeredjava.rmi.RemoteException
- if a remote exception occurspublic void register_synchronization(RemoteSynchro sync) throws java.rmi.RemoteException
register_synchronization
in interface Coordinator
sync
- RemoteSynchro to be registeredjava.rmi.RemoteException
- if a remote exception occurspublic void rollback_only() throws java.rmi.RemoteException
rollback_only
in interface Coordinator
java.rmi.RemoteException
- Cannot rollback transactionpublic java.lang.String get_transaction_name() throws java.rmi.RemoteException
get_transaction_name
in interface Coordinator
java.rmi.RemoteException
- if a remote exception occurspublic void commit(boolean report_heuristics) throws java.rmi.RemoteException
commit
in interface Terminator
report_heuristics
- want to report heuristics if anyjavax.transaction.TransactionRolledbackException
- the transaction has been rolled backHeuristicMixed
- Resources have rolled backHeuristicHazard
- Resources may have rolled backjava.rmi.RemoteException
- if a remote exception occurspublic void rollback() throws java.rmi.RemoteException
rollback
in interface Resource
rollback
in interface Terminator
java.rmi.RemoteException
- rollback: bad statuspublic int prepare() throws java.rmi.RemoteException
public void commit() throws java.rmi.RemoteException
public void commit_one_phase() throws java.rmi.RemoteException
commit_one_phase
in interface Resource
java.rmi.RemoteException
public void forget() throws java.rmi.RemoteException
public int replay_completion(Resource res) throws java.rmi.RemoteException
replay_completion
in interface RecoveryCoordinator
res
- Resource recoveringjava.rmi.RemoteException
public void timeoutExpired(java.lang.Object arg)
timeoutExpired
in interface TimerEventListener