Class PipelineBlock<I,O>
- java.lang.Object
-
- org.apache.ignite.internal.processors.bulkload.pipeline.PipelineBlock<I,O>
-
- Direct Known Subclasses:
CharsetDecoderBlock,CsvLineProcessorBlock,LineSplitterBlock,StrListAppenderBlock
public abstract class PipelineBlock<I,O> extends Object
A file parsing pipeline block. Accepts an portion of an input (isLastPortion flag is provided to signify the last block to process) and optionally calls the next block with transformed input or performs any other handling, such as storing input to internal structures.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidaccept(I inputPortion, boolean isLastPortion)Accepts a portion of input.<N> PipelineBlock<O,N>append(PipelineBlock<O,N> next)Sets the next block in this block and returns the next block.
-
-
-
Method Detail
-
append
public <N> PipelineBlock<O,N> append(PipelineBlock<O,N> next)
Sets the next block in this block and returns the next block.Below is an example of using this method to set up a pipeline:
block1.append(block2).append(block3);.Block2 here becomes the next for block1, and block3 is the next one for the block2.
- Parameters:
next- The next block for the current block.- Returns:
- The next block (
nextargument).
-
accept
public abstract void accept(I inputPortion, boolean isLastPortion) throws IgniteCheckedException
Accepts a portion of input.isLastPortionparameter should be set if this is a last portion of the input. The method must not be called after the end of input: the call withisLastPortion == trueis the last one.- Parameters:
inputPortion- Portion of input.isLastPortion- Is this the last portion.- Throws:
IgniteCheckedException- On error.
-
-