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, startprotected 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
AdaptorExceptionAdaptor.shutdown()@Deprecated public void hardStop() throws AdaptorException
AdaptorExceptionpublic long shutdown(AdaptorShutdownPolicy shutdownPolicy)
Adaptorpublic String parseArgs(String params)
Adaptorprotected 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