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, waitcreateNewCacheFile, moveToReadyToOut, readBulkDatadataIsAvailable, getDataProvider, processData, processData, setDataProvidergetBulkData, getCurrArchFile, getData, getData, getDataReceiver, getProcessedArchFile, isDataAvailable, removeProcessedFile, setDataReceiver, setProcessedArchFile, signalBatchCompletion, validOIMinorTypegetFileBulkData, getFileData, getFileDataReceiver, handleRejectOfFile, isEndOfFile, isFileDataAvailable, isStartOfFile, openInputFile, rejectFile, setFileDataReceiverfileDataIsAvailable, getFileDataProvider, processEndOfFileData, processFileData, processFileData, processRejectFile, processStartOfFileData, setFileDataProvider, setTransactionIDprotected boolean inputShutdown
protected boolean outputShutdown
protected java.lang.Long narsIn
protected java.lang.Long narsOut
protected DCNodePerformance np
public DCFieldContainer readData()
readData in interface DCStreamHandlerpublic abstract NAR readNAR()
public abstract NAR[] readNARs()
public boolean writeData(DCFieldContainer field)
writeData in interface DCStreamHandlerfield - Object to put the information intotrue, if the data was successfully
written to the objectpublic boolean writeData(DCFieldContainer[] fields)
writeData in interface DCStreamHandlertrue, if the data was successfully
written to the objectpublic DCNodePerformance getPerformanceMetrics()
getPerformanceMetrics in interface DCStreamHandlerpublic abstract boolean storeNAR(NAR record)
public abstract boolean storeNARs(NAR[] records)
public abstract boolean cleanup()
cleanup in interface DCStreamHandlerpublic void shutdown()
shutdown in interface DCStreamHandlerpublic void shutdownInput()
shutdownInput in interface DCStreamHandlerpublic void shutdownOutput()
shutdownOutput in interface DCStreamHandlerpublic abstract long getRealNarsIn()