| Constructor and Description |
|---|
LineProcessor(ExecutorService executorService,
BlockingQueue<SerializedLine> destination,
LineParser parser,
boolean retainOriginalLine,
LineprocessorListenerForProvider progressListener,
int workersCount) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLine(RawLine rawLine)
Add a new line of raw data for parsing and serialization
|
void |
markDataComplete()
Marks that the no more data should be expected, though in flight data will still be processed.
|
void |
run()
Runs the processor, parsing the raw line data and serializing it into a suitable form.
|
public LineProcessor(ExecutorService executorService, BlockingQueue<SerializedLine> destination, LineParser parser, boolean retainOriginalLine, LineprocessorListenerForProvider progressListener, int workersCount)
executorService - the executor service used for handling parsing of batchesdestination - the queue where serialized lines are written toparser - the parser to use for parsing the line dataretainOriginalLine - indicates if the original line data should be retained alongside the
serialized dataprogressListener - the listener for reporting progresspublic void markDataComplete()
public void addLine(RawLine rawLine)
rawLine - the raw line dataCopyright © 2021. All rights reserved.