LogicalTxnParticipantFactory Class Reference

LogicalTxnParticipantFactory defines an interface for reconstructing instances of LogicalTxnParticipant during recovery. More...

#include <LogicalTxnParticipantFactory.h>

Inheritance diagram for LogicalTxnParticipantFactory:

BTreeRecoveryFactory DatabaseTest FtrsTableWriterFactory LogicalTxnTest List of all members.

Public Member Functions

virtual ~LogicalTxnParticipantFactory ()
virtual SharedLogicalTxnParticipant loadParticipant (LogicalTxnClassId classId, ByteInputStream &logStream)=0
 Recovers a LogicalTxnParticipant from the log.

Detailed Description

LogicalTxnParticipantFactory defines an interface for reconstructing instances of LogicalTxnParticipant during recovery.

Definition at line 35 of file LogicalTxnParticipantFactory.h.


Constructor & Destructor Documentation

LogicalTxnParticipantFactory::~LogicalTxnParticipantFactory (  )  [virtual]

Definition at line 52 of file LogicalTxnParticipant.cpp.

00053 {
00054 }


Member Function Documentation

virtual SharedLogicalTxnParticipant LogicalTxnParticipantFactory::loadParticipant ( LogicalTxnClassId  classId,
ByteInputStream logStream 
) [pure virtual]

Recovers a LogicalTxnParticipant from the log.

Using the classId to determine the participant type to create, the factory reads required constructor parameters from the log input stream. The factory may peool participant instances; i.e. when the same constructor parameters are encountered a second time, the factory can return the same instance. (TODO: refine this when parallelized recovery is implemented.) The implementation must consume ALL log data for this record, even if some of it turns out to be unneeded.

Parameters:
classId the LogicalTxnClassId recorded when the participant was logged while online
logStream the log information written by the participant's describeParticipant() implementation
Returns:
reference to loaded participant

Implemented in BTreeRecoveryFactory, FtrsTableWriterFactory, DatabaseTest, and LogicalTxnTest.

Referenced by LogicalRecoveryTxn::recoverParticipant().


The documentation for this class was generated from the following files:
Generated on Mon Jun 22 04:00:39 2009 for Fennel by  doxygen 1.5.1