ExecStreamEmbryo Class Reference

ExecStreamEmbryo encapsulates the "embryonic" state of an ExecStream in which it has been created, and thus has a definite type, and also has all of its parameters defined; but its prepare() method has not yet been called. More...

#include <ExecStreamEmbryo.h>

List of all members.

Public Member Functions

template<class S, class P>
void init (S *pStreamInit, P const &paramsInit)
 Initializes reference to stream and parameters for preparing it.
SharedExecStreamgetStream ()
SharedExecStreamParamsgetParams ()
void prepareStream ()
 Executes bound prepare method.

Private Attributes

SharedExecStream pStream
 Unprepared stream.
SharedExecStreamParams pParams
 Params to use for preparing stream.
boost::function< void()> prepareFunction
 Bound function for preparing stream.


Detailed Description

ExecStreamEmbryo encapsulates the "embryonic" state of an ExecStream in which it has been created, and thus has a definite type, and also has all of its parameters defined; but its prepare() method has not yet been called.

The embryo can be put in "cold storage" until everything is ready for its quickening.

This form is necessary because all of the streams constituting an ExecStreamGraph must be created and added to the graph before any of them can be prepared.

Author:
John V. Sichi
Version:
Id
//open/dev/fennel/exec/ExecStreamEmbryo.h#10

Definition at line 48 of file ExecStreamEmbryo.h.


Member Function Documentation

template<class S, class P>
void ExecStreamEmbryo::init ( S *  pStreamInit,
P const &  paramsInit 
) [inline]

Initializes reference to stream and parameters for preparing it.

Be sure to invoke this with parameters of most-specific type or the correct prepare() overload will not be called.

Parameters:
pStreamInit newly allocated ExecStream implementation; ExecStreamEmbryo takes ownership of the supplied pointer, so it must be dynamically allocated
paramsInit ExecStreamParams implementation; ExecStreamEmbryo does not take ownership of the supplied reference, so normally it should be stack-allocated

Definition at line 81 of file ExecStreamEmbryo.h.

Referenced by ParallelExecStreamScheduler::createBufferProvisionAdapter(), ExecStreamScheduler::createBufferProvisionAdapter(), ExecStreamScheduler::createCopyProvisionAdapter(), ExecStreamFactory::implementSortWithBTree(), LbmExecStreamTestBase::initNormalizerExecStream(), LbmExecStreamTestBase::initSorterExecStream(), LbmExecStreamTestBase::initValuesExecStream(), LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), LbmMinusExecStreamTest::newMinusStream(), LcsClusterReplaceExecStreamTest::replaceCluster(), LcsMultiClusterAppendTest::scanCols(), LcsClusterAppendExecStreamTest::setUpDelIndexScan(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamTestSuite::testBTreeInsertExecStream(), ExecStreamTestSuite::testCartesianJoinExecStream(), CollectExecStreamTestSuite::testCollectCollectUncollectUncollect(), CollectExecStreamTestSuite::testCollectInts(), CollectExecStreamTestSuite::testCollectUncollect(), CalcExecStreamTestSuite::testConstant(), ExecStreamTestSuite::testCopyExecStream(), CorrelationJoinExecStreamTestSuite::testCorrelationJoin(), ExecStreamTestSuite::testCountAggExecStream(), LhxAggExecStreamTest::testCountImpl(), ExecStreamTestSuite::testDoubleBufferExecStream(), LcsRowScanExecStreamTest::testFilterCols(), ExecStreamGovernorTest::testGovernor(), ExecStreamTestSuite::testGroupAggExecStreamNrows(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), LbmIntersectExecStreamTest::testIntersect(), LbmLoadBitmapTest::testLoad(), LcsClusterAppendExecStreamTest::testLoadMultiCol(), LcsClusterAppendExecStreamTest::testLoadSingleCol(), ExecStreamTestSuite::testMergeExecStream(), ExecStreamTestSuite::testMergeImplicitPullInputs(), ExecStreamTestSuite::testNestedLoopJoinExecStream(), LbmNormalizerExecStreamTest::testNormalizer(), ExecStreamTestSuite::testReshapeExecStream(), LbmMinusExecStreamTest::testRestartingMinus(), LcsRowScanExecStreamTest::testSampleScanCols(), LcsRowScanExecStreamTest::testScanCols(), LbmSearchTest::testScanIdx(), LcsClusterAppendExecStreamTest::testScanMultiCol(), LcsClusterAppendExecStreamTest::testScanSingleCol(), ExecStreamTestSuite::testScratchBufferExecStream(), ExecStreamTestSuite::testSegBufferExecStream(), ExecStreamTestSuite::testSegBufferReaderWriterExecStream(), ExecStreamTestSuite::testSingleValueAggExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), LbmSortedAggExecStreamTest::testSortedAgg(), ExecStreamTestSuite::testSplitterPlusBarrier(), FlatFileExecStreamTest::testStream(), ExecStreamTestSuite::testSumAggExecStream(), LhxAggExecStreamTest::testSumImpl(), LbmUnionExecStreamTest::testUnion(), LcsClusterReplaceExecStreamTest::verifyCluster(), ExecStreamSubFactory_lu::visit(), and ExecStreamFactory::visit().

00082     {
00083         pStream.reset(pStreamInit, ClosableObjectDestructor());
00084         P *pParamCopy = new P(paramsInit);
00085         pParams.reset(pParamCopy);
00086         prepareFunction = boost::bind(
00087             &S::prepare, pStreamInit, boost::ref(*pParamCopy));
00088     }

SharedExecStream& ExecStreamEmbryo::getStream (  )  [inline]

Definition at line 90 of file ExecStreamEmbryo.h.

Referenced by ExecStreamGraphEmbryo::addAdapterFor(), ExecStreamBuilder::buildStream(), ExecStreamGraphEmbryo::initializeAdapter(), LbmExecStreamTestBase::initNormalizerExecStream(), LbmExecStreamTestBase::initSorterExecStream(), LbmExecStreamTestBase::initValuesExecStream(), LcsClusterReplaceExecStreamTest::loadCluster(), LcsMultiClusterAppendTest::loadClusters(), LcsRowScanExecStreamTest::loadOneCluster(), LbmSearchTest::loadTableAndIndex(), LbmMinusExecStreamTest::newMinusStream(), ExecStreamUnitTestBase::prepareConfluenceGraph(), ExecStreamUnitTestBase::prepareConfluenceTransformGraph(), ExecStreamUnitTestBase::prepareDAG(), ExecStreamGraphEmbryo::prepareGraph(), ExecStreamUnitTestBase::prepareTransformGraph(), LcsClusterReplaceExecStreamTest::replaceCluster(), ExecStreamGraphEmbryo::saveStreamEmbryo(), LcsMultiClusterAppendTest::scanCols(), LcsClusterAppendExecStreamTest::setUpDelIndexScan(), LbmSplicerExecStreamTest::spliceInput(), ExecStreamTestSuite::testBTreeInsertExecStream(), ExecStreamTestSuite::testCartesianJoinExecStream(), CollectExecStreamTestSuite::testCollectCollectUncollectUncollect(), CollectExecStreamTestSuite::testCollectInts(), CollectExecStreamTestSuite::testCollectUncollect(), CalcExecStreamTestSuite::testConstant(), ExecStreamTestSuite::testCopyExecStream(), CorrelationJoinExecStreamTestSuite::testCorrelationJoin(), ExecStreamTestSuite::testCountAggExecStream(), LhxAggExecStreamTest::testCountImpl(), ExecStreamTestSuite::testDoubleBufferExecStream(), LcsRowScanExecStreamTest::testFilterCols(), ExecStreamGovernorTest::testGovernor(), ExecStreamTestSuite::testGroupAggExecStreamNrows(), LhxAggExecStreamTest::testGroupCountImpl(), LhxJoinExecStreamTest::testImpl(), ExternalSortExecStreamTest::testImpl(), LbmIntersectExecStreamTest::testIntersect(), LbmLoadBitmapTest::testLoad(), LcsClusterAppendExecStreamTest::testLoadMultiCol(), LcsClusterAppendExecStreamTest::testLoadSingleCol(), ExecStreamTestSuite::testMergeExecStream(), ExecStreamTestSuite::testMergeImplicitPullInputs(), ExecStreamTestSuite::testNestedLoopJoinExecStream(), LbmNormalizerExecStreamTest::testNormalizer(), ExecStreamTestSuite::testReshapeExecStream(), LbmMinusExecStreamTest::testRestartingMinus(), LcsRowScanExecStreamTest::testSampleScanCols(), LcsRowScanExecStreamTest::testScanCols(), LbmSearchTest::testScanIdx(), LcsClusterAppendExecStreamTest::testScanMultiCol(), LcsClusterAppendExecStreamTest::testScanSingleCol(), ExecStreamTestSuite::testScratchBufferExecStream(), ExecStreamTestSuite::testSegBufferExecStream(), ExecStreamTestSuite::testSegBufferReaderWriterExecStream(), ExecStreamTestSuite::testSingleValueAggExecStream(), LhxAggExecStreamTest::testSingleValueImpl(), LbmSortedAggExecStreamTest::testSortedAgg(), ExecStreamTestSuite::testSplitterPlusBarrier(), FlatFileExecStreamTest::testStream(), ExecStreamTestSuite::testSumAggExecStream(), LhxAggExecStreamTest::testSumImpl(), LbmUnionExecStreamTest::testUnion(), LcsClusterReplaceExecStreamTest::verifyCluster(), and ExecStreamFactory::visitStream().

00091     {
00092         return pStream;
00093     }

SharedExecStreamParams& ExecStreamEmbryo::getParams (  )  [inline]

Definition at line 95 of file ExecStreamEmbryo.h.

Referenced by ExecStreamGraphEmbryo::initializeAdapter().

00096     {
00097         return pParams;
00098     }

void ExecStreamEmbryo::prepareStream (  )  [inline]

Executes bound prepare method.

Definition at line 103 of file ExecStreamEmbryo.h.

Referenced by ExecStreamGraphEmbryo::prepareGraph().

00104     {
00105         prepareFunction();
00106     }


Member Data Documentation

SharedExecStream ExecStreamEmbryo::pStream [private]

Unprepared stream.

Definition at line 53 of file ExecStreamEmbryo.h.

SharedExecStreamParams ExecStreamEmbryo::pParams [private]

Params to use for preparing stream.

Definition at line 58 of file ExecStreamEmbryo.h.

boost::function<void ()> ExecStreamEmbryo::prepareFunction [private]

Bound function for preparing stream.

Definition at line 63 of file ExecStreamEmbryo.h.


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