Simple implementation of the T:IChunkProcessorinterface that handles basic item writing and processing. Any exceptions encountered will be rethrown. More...
Public Member Functions | |
void | AfterPropertiesSet () |
SimpleChunkProcessor (IItemProcessor< TIn, TOut > itemProcessor, IItemWriter< TOut > itemWriter) | |
Custom constructor using and itemprocessor and an itemwriter. More... | |
void | Process (StepContribution contribution, Chunk< TIn > inputs) |
see IChunkProcessor::Process. More... | |
Public Member Functions inherited from Summer.Batch.Core.Step.Item.IChunkProcessor< TIn > | |
void | Process (StepContribution contribution, Chunk< TI > chunk) |
Process the chunk. More... | |
Protected Member Functions | |
void | InitializeUserData (Chunk< TIn > inputs) |
Extension point for subclasses to allow them to memorise the contents of the inputs, in case they are needed for accounting purposes later. The default implementation sets up some user data to remember the original size of the inputs. If this method is overridden then some or all of IsComplete, GetFilterCount and GetAdjustedOutputs might also need to be, to ensure that the user data is handled consistently. More... | |
bool | IsComplete (Chunk< TIn > inputs) |
Extension point for subclasses that want to store additional data in the inputs. Default just checks if inputs are empty. More... | |
TOut | DoProcess (TIn item) |
Process item. More... | |
Chunk< TOut > | Transform (StepContribution contribution, Chunk< TIn > inputs) |
Transform inputs. More... | |
int | GetFilterCount (Chunk< TIn > inputs, Chunk< TOut > outputs) |
Extension point for subclasses to calculate the filter count. Defaults to the difference between input size and output size. More... | |
Chunk< TOut > | GetAdjustedOutputs (Chunk< TIn > inputs, Chunk< TOut > outputs) |
Extension point for subclasses that want to adjust the outputs based on additional saved data in the inputs. Default implementation just returns the outputs unchanged. More... | |
void | Write (StepContribution contribution, Chunk< TIn > inputs, Chunk< TOut > outputs) |
Simple implementation delegates to the DoWrite method and increments the write count in the contribution. Subclasses can handle more complicated scenarios, e.g.with fault tolerance. If output items are skipped they should be removed from the inputs as well. More... | |
void | DoWrite (IList< TOut > items) |
Actual write operation. Delegates to WriteItems. More... | |
void | WriteItems (IList< TOut > items) |
Write list of items More... | |
Properties | |
IItemProcessor< TIn, TOut > | ItemProcessor [get, set] |
Item processor property. More... | |
IItemWriter< TOut > | ItemWriter [get, set] |
Item writer property. More... | |
Detailed Description
Simple implementation of the T:IChunkProcessorinterface that handles basic item writing and processing. Any exceptions encountered will be rethrown.
- Template Parameters
-
TIn TOut
- Type Constraints
-
TIn : class TOut : class
Constructor & Destructor Documentation
Summer.Batch.Core.Step.Item.SimpleChunkProcessor< TIn, TOut >.SimpleChunkProcessor | ( | IItemProcessor< TIn, TOut > | itemProcessor, |
IItemWriter< TOut > | itemWriter | ||
) |
Custom constructor using and itemprocessor and an itemwriter.
- Parameters
-
itemProcessor itemWriter
Member Function Documentation
void Summer.Batch.Core.Step.Item.SimpleChunkProcessor< TIn, TOut >.AfterPropertiesSet | ( | ) |
- See also
- IInitializationPostOperations::AfterPropertiesSet.
Implements Summer.Batch.Common.Factory.IInitializationPostOperations.
|
protected |
Process item.
- Parameters
-
item
- Returns
- Exceptions
-
System.Exception
|
protected |
Actual write operation. Delegates to WriteItems.
- Parameters
-
items
- Exceptions
-
Exception
|
protected |
Extension point for subclasses that want to adjust the outputs based on additional saved data in the inputs. Default implementation just returns the outputs unchanged.
- Parameters
-
inputs outputs
- Returns
|
protected |
Extension point for subclasses to calculate the filter count. Defaults to the difference between input size and output size.
- Parameters
-
inputs outputs
- Returns
|
protected |
Extension point for subclasses to allow them to memorise the contents of the inputs, in case they are needed for accounting purposes later. The default implementation sets up some user data to remember the original size of the inputs. If this method is overridden then some or all of IsComplete, GetFilterCount and GetAdjustedOutputs might also need to be, to ensure that the user data is handled consistently.
- Parameters
-
inputs the inputs for the process
|
protected |
Extension point for subclasses that want to store additional data in the inputs. Default just checks if inputs are empty.
- Parameters
-
inputs
- Returns
void Summer.Batch.Core.Step.Item.SimpleChunkProcessor< TIn, TOut >.Process | ( | StepContribution | contribution, |
Chunk< TIn > | inputs | ||
) |
- Parameters
-
contribution inputs
|
protected |
Transform inputs.
- Parameters
-
contribution inputs
- Returns
- Exceptions
-
System.Exception
|
protected |
Simple implementation delegates to the DoWrite method and increments the write count in the contribution. Subclasses can handle more complicated scenarios, e.g.with fault tolerance. If output items are skipped they should be removed from the inputs as well.
- Parameters
-
contribution inputs outputs
- Exceptions
-
Exception
|
protected |
Write list of items
- Parameters
-
items
Property Documentation
|
getset |
Item processor property.
|
getset |
Item writer property.
The documentation for this class was generated from the following file:
- Summer.Batch.Core/Core/Step/Item/SimpleChunkProcessor.cs