BusBoy  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
BUSBOY::DatasetContext Class Reference

#include <DatasetContext.h>

Inheritance diagram for BUSBOY::DatasetContext:
BUSBOY::ExternalDatasetContext

Public Member Functions

 DatasetContext ()
 
virtual DataFilefindDataFile (const DataKey &key) const
 Tries to find a file corresponding to the given key. More...
 
virtual bool isOutput () const
 default is false More...
 
virtual bool isQueryOnly () const
 Indicates that no file keys are pushed into the dataset Default is false. More...
 
virtual void addDataFile (const DataKey &key, DataFile *file)
 Create a new output file for writing. More...
 
virtual std::string getDataFileName (const DataKey &key) const
 Tries to get the name of the data file. More...
 
virtual RandomAccessFilereadFileAsRandomAccess (const DataKey &key) const
 Access input file as a read-only random access file Default is to throw exception. More...
 
virtual WritableRandomAccessFilewriteFileAsRandomAccess (const DataKey &key) const
 Access output file as a writable random access file Default is to throw exception. More...
 

Constructor & Destructor Documentation

BUSBOY::DatasetContext::DatasetContext ( )

Member Function Documentation

void BUSBOY::DatasetContext::addDataFile ( const DataKey key,
DataFile file 
)
virtual

Create a new output file for writing.

Default is to throw exception

Reimplemented in BUSBOY::ExternalDatasetContext.

DataFile * BUSBOY::DatasetContext::findDataFile ( const DataKey key) const
virtual

Tries to find a file corresponding to the given key.

Default behavior is no file found.

Returns
null if there is no file with this key

Reimplemented in BUSBOY::ExternalDatasetContext.

std::string BUSBOY::DatasetContext::getDataFileName ( const DataKey key) const
virtual

Tries to get the name of the data file.

Default is name not available.

Returns
empty string if the name is not available

Reimplemented in BUSBOY::ExternalDatasetContext.

bool BUSBOY::DatasetContext::isOutput ( ) const
virtual

default is false

Reimplemented in BUSBOY::ExternalDatasetContext.

bool BUSBOY::DatasetContext::isQueryOnly ( ) const
virtual

Indicates that no file keys are pushed into the dataset Default is false.

Reimplemented in BUSBOY::ExternalDatasetContext.

RandomAccessFile * BUSBOY::DatasetContext::readFileAsRandomAccess ( const DataKey key) const
virtual

Access input file as a read-only random access file Default is to throw exception.

Reimplemented in BUSBOY::ExternalDatasetContext.

WritableRandomAccessFile * BUSBOY::DatasetContext::writeFileAsRandomAccess ( const DataKey key) const
virtual

Access output file as a writable random access file Default is to throw exception.

Reimplemented in BUSBOY::ExternalDatasetContext.


The documentation for this class was generated from the following files:

Copyright 2014 Google Inc. All rights reserved.