An implementation of a work package processor that will extract record store keys, and optionally, values, from a WorkPackage.
More...
#include <be_mpi_recordprocessor.h>
Inherits BiometricEvaluation::MPI::WorkPackageProcessor.
An implementation of a work package processor that will extract record store keys, and optionally, values, from a WorkPackage.
Subclasses of this abstract class must implement the method to process the records associated with the keys.
Definition at line 27 of file be_mpi_recordprocessor.h.
◆ RecordProcessor()
BiometricEvaluation::MPI::RecordProcessor::RecordProcessor |
( |
const std::string & |
propertiesFileName | ) |
|
Construct a work package processor with the given properties.
A record processor uses a named record store to retrieve the data to be processed when only the key is delivered as part of a work package. When both key and value are part of the work package, there is no need to have access to the source record store.
- Note
- The size of a single value item is limited to 2^32 octets. If the size of the value item is larger, behavior is undefined.
- Parameters
-
[in] | propertiesFileName | The name of the file containing the properties for this object. |
- Exceptions
-
Error::Exception | An error occurred, usually due to missing or incorrect properties. |
◆ ~RecordProcessor()
virtual BiometricEvaluation::MPI::RecordProcessor::~RecordProcessor |
( |
| ) |
|
|
virtual |
◆ processRecord() [1/2]
virtual void BiometricEvaluation::MPI::RecordProcessor::processRecord |
( |
const std::string & |
key | ) |
|
|
pure virtual |
Method implemented by child classes to perform an action using each record from the Record Store.
The source RecordStore must be accessible to the the implementation as the value for each key is not included.
- Parameters
-
[in] | key | The key associated with the record that is to be processed. |
- Exceptions
-
Error::Exception | An error occurred processing the record: Missing record, input/output error, or memory allocation. |
◆ processRecord() [2/2]
virtual void BiometricEvaluation::MPI::RecordProcessor::processRecord |
( |
const std::string & |
key, |
|
|
const Memory::uint8Array & |
value |
|
) |
| |
|
pure virtual |
Method implemented by child classes to perform an action using each record from the Record Store.
- Parameters
-
[in] | key | The key associated with the record that is to be processed. |
[in] | value | The data from the record that is to be processed. |
- Exceptions
-
Error::Exception | An fatal error occurred when processing the work package; the processing responsible for this object should shut down. |
◆ newProcessor()
Obtain an object that will process work packages.
This method is part of the factory personality.
- Parameters
-
logsheet | A shared pointer to the IO::Logsheet that may be used to save messages generated by the object. |
- Returns
- A shared pointer to the work package processor.
- Note
- This method should always create a non-null WorkPackageProcessor. If an error occurs during construction, throw a Error::Exception with a message to be caught and logged.
Implements BiometricEvaluation::MPI::WorkPackageProcessor.
◆ performInitialization()
virtual void BiometricEvaluation::MPI::RecordProcessor::performInitialization |
( |
std::shared_ptr< IO::Logsheet > & |
logsheet | ) |
|
|
pure virtual |
Initialization function to be called before work is distributed to the work package processor.
Implementations of this class can use this function to do any processing necessary before work is given to the processor, pre-forking.
This method is part of the factory personality. All state that is to be common across all package processor objects can be initialized in this method.
- Parameters
-
logsheet | A shared pointer to the IO::Logsheet that may be used to save messages generated by the object. |
- Exceptions
-
Implements BiometricEvaluation::MPI::WorkPackageProcessor.
◆ processWorkPackage()
void BiometricEvaluation::MPI::RecordProcessor::processWorkPackage |
( |
MPI::WorkPackage & |
workPackage | ) |
|
|
virtual |
◆ getResources()
The documentation for this class was generated from the following file: