org.openorb.ots.log

Class Reader

public class Reader extends Object

This class is used to read logs.

Author: Jerome Daniel

Constructor Summary
Reader(String log_name, ORB orb, Logger logger)
Constructor
Method Summary
voidclose()
This operation is used to close this log reader
booleanfree_resources(XID xid, Vector resources)
This operation returns all free resources ( not prepared, not committed, not rolledback ) for this transaction XID.
intis_any_rollback(XID xid)
Return 0 if no rollback found for a resource, 1 if a rollback is found and 2 if the rollback is not found with transaction begin
booleanprepared_resources(XID xid, Vector resources)
This operation returns all prepared resources ( not committed, not rolledback ) for this transaction XID.
intprepare_vote(XID xid)
This operation returns the prepare vote found in this log for the asked XID
Stringprevious_log()
Return the previous log name or NULL if none.
booleanregistered_resources(XID xid, Vector resources)
This operation returns all registered resources for this transaction XID.
Statustransaction_status(XID xid)
This operation returns the transaction status found in this log for the asked XID
XID[]uncompleted_transactions()
Return all uncompleted transactions found into this log

Constructor Detail

Reader

public Reader(String log_name, ORB orb, Logger logger)
Constructor

Method Detail

close

public void close()
This operation is used to close this log reader

free_resources

public boolean free_resources(XID xid, Vector resources)
This operation returns all free resources ( not prepared, not committed, not rolledback ) for this transaction XID. It also returns TRUE if the begin transaction was found into this log.

is_any_rollback

public int is_any_rollback(XID xid)
Return 0 if no rollback found for a resource, 1 if a rollback is found and 2 if the rollback is not found with transaction begin

prepared_resources

public boolean prepared_resources(XID xid, Vector resources)
This operation returns all prepared resources ( not committed, not rolledback ) for this transaction XID. It also returns TRUE if the begin transaction was found into this log.

prepare_vote

public int prepare_vote(XID xid)
This operation returns the prepare vote found in this log for the asked XID

previous_log

public String previous_log()
Return the previous log name or NULL if none.

registered_resources

public boolean registered_resources(XID xid, Vector resources)
This operation returns all registered resources for this transaction XID. It also returns TRUE if the begin transaction was found into this log.

transaction_status

public Status transaction_status(XID xid)
This operation returns the transaction status found in this log for the asked XID

uncompleted_transactions

public XID[] uncompleted_transactions()
Return all uncompleted transactions found into this log