Top Description Constructors Methods
com.univocity.parsers.common.processor

public Class ConcurrentRowProcessor

extends AbstractConcurrentProcessor<ParsingContext>
implements RowProcessor
Class Inheritance
All Implemented Interfaces
com.univocity.parsers.common.processor.RowProcessor, com.univocity.parsers.common.processor.core.Processor
Imports
com.univocity.parsers.common.*, com.univocity.parsers.common.processor.core.*

A RowProcessor implementation to perform row processing tasks in parallel. The ConcurrentRowProcessor wraps another RowProcessor, and collects rows read from the input. The actual row processing is performed in by wrapped RowProcessor in a separate thread.
Author
Univocity Software Pty Ltd - [email protected]
See Also
AbstractParser, RowProcessor

Constructor Summary

AccessConstructor and Description
public
ConcurrentRowProcessor(RowProcessor
a regular RowProcessor implementation which will be executed in a separate thread.
rowProcessor
)

Creates a non-blocking ConcurrentRowProcessor, to perform processing of rows parsed from the input in a separate thread.

public
ConcurrentRowProcessor(RowProcessor
a regular RowProcessor implementation which will be executed in a separate thread.
rowProcessor
,
int
the limit of rows to be kept in memory before the input parsing process is blocked.
limit
)

Creates a blocking ConcurrentRowProcessor, to perform processing of rows parsed from the input in a separate thread.

Method Summary

Modifier and TypeMethod and Description
protected ParsingContext
protected ParsingContext
Inherited from com.univocity.parsers.common.processor.core.AbstractConcurrentProcessor:
getRowCountisContextCopyingEnabledprocessEndedprocessStartedrowProcessedsetContextCopyingEnabled

Constructor Detail

ConcurrentRowProcessorback to summary
public ConcurrentRowProcessor(RowProcessor rowProcessor)

Creates a non-blocking ConcurrentRowProcessor, to perform processing of rows parsed from the input in a separate thread.

Parameters
rowProcessor:RowProcessor

a regular RowProcessor implementation which will be executed in a separate thread.

ConcurrentRowProcessorback to summary
public ConcurrentRowProcessor(RowProcessor rowProcessor, int limit)

Creates a blocking ConcurrentRowProcessor, to perform processing of rows parsed from the input in a separate thread.

Parameters
rowProcessor:RowProcessor

a regular RowProcessor implementation which will be executed in a separate thread.

limit:int

the limit of rows to be kept in memory before the input parsing process is blocked.

Method Detail

copyContextback to summary
protected ParsingContext copyContext(ParsingContext context)

Implements abstract com.univocity.parsers.common.processor.core.AbstractConcurrentProcessor.copyContext.

Annotations
@Override
wrapContextback to summary
protected ParsingContext wrapContext(ParsingContext context)

Implements abstract com.univocity.parsers.common.processor.core.AbstractConcurrentProcessor.wrapContext.

Annotations
@Override