public abstract class NARStreamHandler extends java.lang.Object implements DCStreamHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
inputShutdown
Indicates whether the input stream of the StreamHandler is available
|
protected java.lang.Long |
narsIn
Total number of NARs read
|
protected java.lang.Long |
narsOut
Total number of NARs written
|
protected DCNodePerformance |
np
Node Performance object
|
protected boolean |
outputShutdown
Indicates whether the output stream of the StreamHandler is available
|
Constructor and Description |
---|
NARStreamHandler() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
cleanup()
Deletes NARs files that have been processed
|
DCNodePerformance |
getPerformanceMetrics()
Returns a node performance object
|
abstract long |
getRealNarsIn()
This must return a count of how many records this node has read in,
since it started.
|
DCFieldContainer |
readData()
Calls readNAR()
|
abstract NAR |
readNAR()
Retrieves a single NAR file
|
abstract NAR[] |
readNARs()
Retrieves multiple NARs
|
void |
shutdown()
Performs tasks necessary to cleanly shutdown the stream handler
|
void |
shutdownInput()
Performs tasks necessary to cleanly shutdown the input stream of
the stream handler
|
void |
shutdownOutput()
Performs tasks necessary to cleanly shutdown the output stream of
the stream handler
|
abstract boolean |
storeNAR(NAR record)
Writes a single NAR to the cache file
|
abstract boolean |
storeNARs(NAR[] records)
Writes a multiple NARs to the cache file
|
boolean |
writeData(DCFieldContainer field)
Calls storeNAR()
|
boolean |
writeData(DCFieldContainer[] fields)
Calls storeNAR()
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createNewCacheFile, moveToReadyToOut, readBulkData
dataIsAvailable, getDataProvider, processData, processData, setDataProvider
getBulkData, getData, getDataReceiver, isDataAvailable, setDataReceiver
getFileBulkData, getFileData, getFileDataReceiver, handleRejectOfFile, isEndOfFile, isFileDataAvailable, isStartOfFile, openInputFile, rejectFile, setFileDataReceiver
fileDataIsAvailable, getFileDataProvider, processEndOfFileData, processFileData, processFileData, processRejectFile, processStartOfFileData, setFileDataProvider, setTransactionID
protected boolean inputShutdown
protected boolean outputShutdown
protected java.lang.Long narsIn
protected java.lang.Long narsOut
protected DCNodePerformance np
public DCFieldContainer readData()
readData
in interface DCStreamHandler
public abstract NAR readNAR()
public abstract NAR[] readNARs()
public boolean writeData(DCFieldContainer field)
writeData
in interface DCStreamHandler
field
- Object to put the information intotrue
, if the data was successfully
written to the objectpublic boolean writeData(DCFieldContainer[] fields)
writeData
in interface DCStreamHandler
true
, if the data was successfully
written to the objectpublic DCNodePerformance getPerformanceMetrics()
getPerformanceMetrics
in interface DCStreamHandler
public abstract boolean storeNAR(NAR record)
public abstract boolean storeNARs(NAR[] records)
public abstract boolean cleanup()
cleanup
in interface DCStreamHandler
public void shutdown()
shutdown
in interface DCStreamHandler
public void shutdownInput()
shutdownInput
in interface DCStreamHandler
public void shutdownOutput()
shutdownOutput
in interface DCStreamHandler
public abstract long getRealNarsIn()