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

#include <ExternalDatasetContext.h>

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

Public Member Functions

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

Constructor & Destructor Documentation

BUSBOY::ExternalDatasetContext::ExternalDatasetContext ( bool  output,
const CExternalDatasetCallbacks callbacks,
ExternalDatasetSerializer serializer 
)
BUSBOY::ExternalDatasetContext::~ExternalDatasetContext ( )

Member Function Documentation

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

Create a new output file for writing.

Default is to throw exception

Reimplemented from BUSBOY::DatasetContext.

DataFile * BUSBOY::ExternalDatasetContext::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 from BUSBOY::DatasetContext.

std::string BUSBOY::ExternalDatasetContext::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 from BUSBOY::DatasetContext.

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

default is false

Reimplemented from BUSBOY::DatasetContext.

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

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

Reimplemented from BUSBOY::DatasetContext.

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

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

Reimplemented from BUSBOY::DatasetContext.

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

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

Reimplemented from BUSBOY::DatasetContext.


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

Copyright 2014 Google Inc. All rights reserved.