IBulkParameterProcessor Class Reference

Bulk processor interface for parameter segments. More...

List of all members.

Public Member Functions

virtual simba_unsigned_native GetNumberParameterSetsAvailable ()=0
 Get the number of available parameter sets.
virtual simba_signed_native GetOutputMaximumSize ()=0
 Compute the maximum memory size that each output value generated by the Process function will take.
virtual simba_uint16 GetParameterIndex ()=0
 Get the 0-based index of the parameter for which this bulk processor was created.
virtual const
Simba::Support::SqlCTypeMetadata
GetSourceMetadataRef ()=0
 Get a reference to the metadata objects of the source parameter values processed by this bulk parameter processor.
virtual const
Simba::Support::SqlTypeMetadata
GetTargetMetadataRef ()=0
 Get a reference to the metadata objects of the target parameter values processed by this bulk parameter processor.
virtual simba_unsigned_native Process (Simba::Support::AbstractParameterSegment &in_fromSegment)=0
 Process the source parameter values and fill-up the entries of the given target parameter segment with the resulting values.
virtual ~IBulkParameterProcessor ()
 Destructor.

Protected Member Functions

 IBulkParameterProcessor ()
 Constructor.

Detailed Description

Bulk processor interface for parameter segments.

This interface is responsible for processing the parameter segments of data returned from the DSII, allowing the SDK to convert a large amounts of parameter values in a single call.

DSIIs should retrieve the parameter index for this processor and then submit parameter segments to the processor for that parameter.


Constructor & Destructor Documentation

virtual ~IBulkParameterProcessor (  )  [inline, virtual]

Destructor.

IBulkParameterProcessor (  )  [inline, protected]

Constructor.


Member Function Documentation

virtual simba_unsigned_native GetNumberParameterSetsAvailable (  )  [pure virtual]

Get the number of available parameter sets.

It corresponds to the number of parameter sets available as input to this bulk parameter processor. The DSII does not however needs to create a segment parameter with that many entries. The source parameter values can be converted block per block with successive calls to the Process() function (see Process() for more information).

Returns:
The number of parameter sets available for conversion.
virtual simba_signed_native GetOutputMaximumSize (  )  [pure virtual]

Compute the maximum memory size that each output value generated by the Process function will take.

The DSII needs to reserve at least this amount of memory for each parameter segment entry data buffer. Reserving less than this amount of memory for each entry could lead to memory corruption during bulk processing.

Returns:
The maximum memory size that a processed value can need.
virtual simba_uint16 GetParameterIndex (  )  [pure virtual]

Get the 0-based index of the parameter for which this bulk processor was created.

Returns:
0-based index of the parameter.
virtual const Simba::Support::SqlCTypeMetadata& GetSourceMetadataRef (  )  [pure virtual]

Get a reference to the metadata objects of the source parameter values processed by this bulk parameter processor.

Returns:
Reference to the metadata corresponding to the source.
virtual const Simba::Support::SqlTypeMetadata& GetTargetMetadataRef (  )  [pure virtual]

Get a reference to the metadata objects of the target parameter values processed by this bulk parameter processor.

Returns:
Reference to the metadata corresponding to the target.
virtual simba_unsigned_native Process ( Simba::Support::AbstractParameterSegment &  in_fromSegment  )  [pure virtual]

Process the source parameter values and fill-up the entries of the given target parameter segment with the resulting values.

This function processes as much parameter values as it can. This number is bounded by the number of parameter that are still available in the source and the number of entries that have been created by the DSII in the target segment.

If the DSII creates less parameter segment entries than available parameter values, it is the responsibility of the DSII to call the Process() function until all parameter values have been processed. The DSII can know that no more parameter values are available when the Process() function returns 0 or a number of processed values below the number of entries available in the segment.

Each call to Process() always starts filling the target segment from the first entry, meaning successive calls to Process() with the same segment will overridde the values generated by the previous call.

Creating less segment entries than available parameter values can make sense in the following scenarios:

  • if the DSII limits its memory usage and does not have enough memory to store at once all source parameter values.
  • if the DSII can efficiently insert data in the same table in two or more thread. The DSII can then create two or more segments, fill them in sequence and then start inserting/updating the rows in one thread per segment.

From a multi-threading point of view, Bulk parameter processors are independent of each other. It means that if there are two or more parameter arrays to process (meaning two or more processors have been created), the Process() function of each processor can be called in a different thread.

Parameters:
in_fromSegment Parameter segment describing the data to process.
Returns:
Number of parameter values that were processed.

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

Generated on Wed May 17 14:21:15 2017 for SimbaEngine 10.1.3.1011 by simba