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.
|
void |
hardStop()
Deprecated.
|
String |
parseArgs(String params)
Parse args, return stream name.
|
long |
shutdown()
Deprecated.
|
long |
shutdown(AdaptorShutdownPolicy shutdownPolicy)
Signals this adaptor to come to an orderly stop.
|
void |
start(long bytes) |
deregisterAndStop, getType, start
protected volatile boolean finished
protected RandomAccessFile reader
protected long fileReadOffset
protected boolean shutdownCalled
public void start(long bytes)
start
in class AbstractAdaptor
@Deprecated public long shutdown() throws AdaptorException
AdaptorException
Adaptor.shutdown()
@Deprecated public void hardStop() throws AdaptorException
AdaptorException
public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
Adaptor
public String parseArgs(String params)
Adaptor
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 © ${year} The Apache Software Foundation