public class FileAdaptor extends AbstractAdaptor
Modifier and Type | Field and Description |
---|---|
protected boolean |
deleteFileOnClose |
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, start
protected volatile boolean finished
protected RandomAccessFile reader
protected long fileReadOffset
protected boolean deleteFileOnClose
protected boolean shutdownCalled
public void start(long bytes)
start
in class AbstractAdaptor
public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
Adaptor
public String parseArgs(String params)
parseArgs
in class AbstractAdaptor
protected 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 fromInterruptedException
Copyright © 2015 Apache Software Foundation. All Rights Reserved.