public class FileAdaptor extends AbstractAdaptor
| Modifier and Type | Field and Description |
|---|---|
protected long |
fileReadOffset |
protected boolean |
finished |
protected RandomAccessFile |
reader |
protected boolean |
shutdownCalled |
adaptorID, control, dest, type| Constructor and Description |
|---|
FileAdaptor() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
extractRecords(ChunkReceiver eq,
long buffOffsetInFile,
byte[] buf,
long fileTime)
Extract records from a byte sequence
|
String |
getCurrentStatus()
Return the adaptor's state Should not include class name or byte
offset, which are written by caller.
|
String |
parseArgs(String params) |
long |
shutdown(AdaptorShutdownPolicy shutdownPolicy)
Signals this adaptor to come to an orderly stop.
|
void |
start(long bytes) |
deregisterAndStop, getType, hardStop, parseArgs, shutdown, startprotected volatile boolean finished
protected RandomAccessFile reader
protected long fileReadOffset
protected boolean shutdownCalled
public void start(long bytes)
start in class AbstractAdaptorpublic long shutdown(AdaptorShutdownPolicy shutdownPolicy)
Adaptorpublic String parseArgs(String params)
parseArgs in class AbstractAdaptorprotected int extractRecords(ChunkReceiver eq, long buffOffsetInFile, byte[] buf, long fileTime) throws InterruptedException
eq - the queue to stick the new chunk[s] inbuffOffsetInFile - the byte offset in the stream at which buf[] beginsbuf - the byte buffer to extract records fromInterruptedExceptionCopyright © ${year} The Apache Software Foundation