public abstract class InputFileProcessor extends java.lang.Object implements InputFileProcessorIfc
Modifier and Type | Field and Description |
---|---|
protected InputStatisticsMonitorIfc |
inputCount |
protected LoggerIfc |
logger
Represents the logging facility for the EI node using
this object.
|
protected EINode |
node |
protected boolean |
running
Number of bytes having been read so far.
|
Constructor and Description |
---|
InputFileProcessor(EINode einode) |
Modifier and Type | Method and Description |
---|---|
protected long |
getLength(java.io.File file)
Returns the length stored in the scratch
file.
|
RecoveryInformation |
getRecoveryInformation() |
protected void |
incrementIn() |
boolean |
postProcessInputData(OpenFileInputStream inputStream,
java.io.File fileToProcess,
java.io.File scratchFile) |
boolean |
preProcessInputData(OpenFileInputStream inputStream,
java.io.File fileToProcess,
java.io.File scratchFile) |
boolean |
processInputData(OpenFileInputStream inputStream,
DataReceiverIfc dataReceiver) |
void |
shutdown()
Specifies actions needed to shut down the thread in which this
object runs.
|
protected void |
writeLength(java.io.File scratchfile,
long len)
Record a long in a file - used to write a length in
a scratch file to keep track of how much of a file
has been processed.
|
protected boolean running
protected LoggerIfc logger
protected EINode node
protected InputStatisticsMonitorIfc inputCount
public InputFileProcessor(EINode einode)
public boolean preProcessInputData(OpenFileInputStream inputStream, java.io.File fileToProcess, java.io.File scratchFile) throws java.lang.Exception
preProcessInputData
in interface InputFileProcessorIfc
java.lang.Exception
public boolean processInputData(OpenFileInputStream inputStream, DataReceiverIfc dataReceiver) throws java.lang.Exception
processInputData
in interface InputFileProcessorIfc
java.lang.Exception
public boolean postProcessInputData(OpenFileInputStream inputStream, java.io.File fileToProcess, java.io.File scratchFile) throws java.lang.Exception
postProcessInputData
in interface InputFileProcessorIfc
java.lang.Exception
public void shutdown()
shutdown
in interface InputFileProcessorIfc
protected void writeLength(java.io.File scratchfile, long len)
protected long getLength(java.io.File file)
file
- Specifies the scratch file.public RecoveryInformation getRecoveryInformation()
getRecoveryInformation
in interface InputFileProcessorIfc
protected void incrementIn()