Class LineProcessor
- java.lang.Object
-
- technology.dice.dicewhere.lineprocessing.LineProcessor
-
-
Constructor Summary
Constructors Constructor Description LineProcessor(ExecutorService executorService, BlockingQueue<SerializedLine> destination, LineParser parser, boolean retainOriginalLine, LineprocessorListenerForProvider progressListener, int workersCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLine(RawLine rawLine)Add a new line of raw data for parsing and serializationvoidmarkDataComplete()Marks that the no more data should be expected, though in flight data will still be processed.voidrun()Runs the processor, parsing the raw line data and serializing it into a suitable form.
-
-
-
Constructor Detail
-
LineProcessor
public LineProcessor(ExecutorService executorService, BlockingQueue<SerializedLine> destination, LineParser parser, boolean retainOriginalLine, LineprocessorListenerForProvider progressListener, int workersCount)
- Parameters:
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 progress
-
-
Method Detail
-
markDataComplete
public void markDataComplete()
Marks that the no more data should be expected, though in flight data will still be processed.
-
addLine
public void addLine(RawLine rawLine)
Add a new line of raw data for parsing and serialization- Parameters:
rawLine- the raw line data
-
-