org.openorb.ots.log
Class Reader

java.lang.Object
  extended by org.openorb.ots.log.Reader

public class Reader
extends java.lang.Object

This class is used to read logs.

Author:
Jerome Daniel

Constructor Summary
Reader(java.lang.String log_name, org.omg.CORBA.ORB orb, org.apache.avalon.framework.logger.Logger logger)
          Constructor
 
Method Summary
 void close()
          This operation is used to close this log reader
 boolean free_resources(XID xid, java.util.Vector resources)
          This operation returns all free resources ( not prepared, not committed, not rolledback ) for this transaction XID.
 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
 int prepare_vote(XID xid)
          This operation returns the prepare vote found in this log for the asked XID
 boolean prepared_resources(XID xid, java.util.Vector resources)
          This operation returns all prepared resources ( not committed, not rolledback ) for this transaction XID.
 java.lang.String previous_log()
          Return the previous log name or NULL if none.
 boolean registered_resources(XID xid, java.util.Vector resources)
          This operation returns all registered resources for this transaction XID.
 Status transaction_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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Reader

public Reader(java.lang.String log_name,
              org.omg.CORBA.ORB orb,
              org.apache.avalon.framework.logger.Logger logger)
Constructor

Method Detail

close

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


uncompleted_transactions

public XID[] uncompleted_transactions()
Return all uncompleted transactions 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


registered_resources

public boolean registered_resources(XID xid,
                                    java.util.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.


prepared_resources

public boolean prepared_resources(XID xid,
                                  java.util.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.


free_resources

public boolean free_resources(XID xid,
                              java.util.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.


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 java.lang.String previous_log()
Return the previous log name or NULL if none.


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