Qore DataProvider Module Reference 2.7.5
Loading...
Searching...
No Matches
DataProvider::DataProviderPipelineFactory Class Reference

A factory class for creating DataProviderPipeline objects. More...

#include <DataProviderPipelineFactory.qc.dox.h>

Public Member Methods

 append (AbstractDataProcessor processor)
 Appends a data processor to the default pipeline. More...
 
 append (int id, AbstractDataProcessor processor)
 Appends a data processor to a pipeline. More...
 
int appendQueue (int id)
 Appends a new queue to an existing pipeline and returns the new queue ID. More...
 
 constructor (*hash< PipelineOptionInfo > opts)
 Creates the object with the given options. More...
 
DataProviderPipeline create (*hash< PipelineOptionInfo > opts)
 Creates a new DataProviderPipeline object. More...
 
hash< PipelineFactoryInfogetInfo ()
 Returns pipeline factory info. More...
 

Private Member Methods

 checkUpdateQueue (softstring id)
 Checks if the given queue exists.
 
 processQueue (DataProviderPipeline pipe, int id, hash< PipelineQueueInfo > queue)
 Creates a queue in a pipeline.
 

Private Attributes

bool do_bulk = True
 Bulk flag.
 
*hash< PipelineOptionInfoopts
 Options for the pipelines.
 
hash< string, hash< PipelineQueueInfo > > pmap
 Hash of queues keyed by queue ID.
 

Detailed Description

A factory class for creating DataProviderPipeline objects.

Note
This object is not thread safe for initialization; it should be initialized in a single thread. Once initialized it can be safely used in multiple threads.

Member Function Documentation

◆ append() [1/2]

DataProvider::DataProviderPipelineFactory::append ( AbstractDataProcessor  processor)

Appends a data processor to the default pipeline.

Note
The initial queue is queue 0

◆ append() [2/2]

DataProvider::DataProviderPipelineFactory::append ( int  id,
AbstractDataProcessor  processor 
)

Appends a data processor to a pipeline.

Parameters
idthe queue ID as returned from appendQueue()
processorthe data processor to append to the pipeline
Exceptions
PIPELINE-ERRORinvalid queue ID or the queue already terminates in additional queues
Note
The initial queue is queue 0
See also
appendQueue()

◆ appendQueue()

int DataProvider::DataProviderPipelineFactory::appendQueue ( int  id)

Appends a new queue to an existing pipeline and returns the new queue ID.

Parameters
idthe queue to which the new pipeline will be appended
Returns
the new queue ID
Exceptions
PIPELINE-ERRORthe pipeline is locked, or the given queue does not exist
Note
The initial queue is queue 0
See also
append(int, AbstractDataProcessor)

◆ constructor()

DataProvider::DataProviderPipelineFactory::constructor ( *hash< PipelineOptionInfo opts)

Creates the object with the given options.

Parameters
optsany options for the pipeline; see PipelineOptionInfo for more information
Note
The object is created with an initial queue with ID 0

◆ create()

DataProviderPipeline DataProvider::DataProviderPipelineFactory::create ( *hash< PipelineOptionInfo opts)

Creates a new DataProviderPipeline object.

Parameters
optsoverride any options given in the constructor

◆ getInfo()

hash< PipelineFactoryInfo > DataProvider::DataProviderPipelineFactory::getInfo ( )

Returns pipeline factory info.

Returns
pipeline factory info; see PipelineFactoryInfo for more information