Package tilda.db.processors
Class ExporterRecordProcessor
- java.lang.Object
-
- tilda.db.processors.ExporterRecordProcessor
-
- All Implemented Interfaces:
RecordProcessor
- Direct Known Subclasses:
ExporterObjectProcessor,ExporterRecordProcessorCSVJSON
public abstract class ExporterRecordProcessor extends java.lang.Object implements RecordProcessor
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean_cleanWriterprotected long_endTsprotected long_logFreqprotected java.io.Writer_outprotected java.lang.String_outNameprotected long_startTsprotected long_totalCountprotected static org.apache.logging.log4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description ExporterRecordProcessor(java.io.Writer out, java.lang.String outName, long logFreq)ExporterRecordProcessor(java.lang.String outFile, long logFreq)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidend(boolean hasMore, int maxCount)Called after the last record has been processed successfullylonggetEndTimeStamp()longgetStartTimeStamp()longgetTotalCount()booleanprocess(int count)voidstart()Called before the first record is processed-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tilda.db.processors.RecordProcessor
process
-
-
-
-
Field Detail
-
LOG
protected static final org.apache.logging.log4j.Logger LOG
-
_out
protected java.io.Writer _out
-
_outName
protected java.lang.String _outName
-
_cleanWriter
protected boolean _cleanWriter
-
_totalCount
protected long _totalCount
-
_startTs
protected long _startTs
-
_endTs
protected long _endTs
-
_logFreq
protected long _logFreq
-
-
Constructor Detail
-
ExporterRecordProcessor
public ExporterRecordProcessor(java.io.Writer out, java.lang.String outName, long logFreq)- Parameters:
out-outName- The name of the WriterlogFreq-
-
ExporterRecordProcessor
public ExporterRecordProcessor(java.lang.String outFile, long logFreq) throws java.io.FileNotFoundException- Parameters:
outFile-logFreq-- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
start
public void start() throws java.lang.ExceptionDescription copied from interface:RecordProcessorCalled before the first record is processed- Specified by:
startin interfaceRecordProcessor- Throws:
java.lang.Exception
-
process
public boolean process(int count) throws java.lang.Exception- Throws:
java.lang.Exception
-
end
public void end(boolean hasMore, int maxCount) throws java.lang.ExceptionDescription copied from interface:RecordProcessorCalled after the last record has been processed successfully- Specified by:
endin interfaceRecordProcessor- Parameters:
hasMore- whether there are more records to be processedmaxCount- the max count originally supplied to the query handler- Throws:
java.lang.Exception
-
getTotalCount
public long getTotalCount()
-
getStartTimeStamp
public long getStartTimeStamp()
-
getEndTimeStamp
public long getEndTimeStamp()
-
-