Log I/O
|
Provides a mechanism for the client to monitor and process data during the DLIS read operation, and also to abort the process in case that is requested by the user or for other reasons. More...
Public Member Functions | |
bool | DataRead (DlisFrame dlisFrame, DlisFile dlisFile) |
A notification from DlisFileReader indicating that a new portion of data has been read into the specified DLIS frame. | |
Provides a mechanism for the client to monitor and process data during the DLIS read operation, and also to abort the process in case that is requested by the user or for other reasons.
Convenient for handling DLIS files that are larger than physical memory. In this case the client should clear the DLIS frame at each invocation.
This machanism must also be used to handle growing (live) DLIS files. If the DlisFileReader.Read is called with isGrowing = true
the call will not return until the stream is closed by the client. During reading the DLIS content must therefore be captured through the IDlisDataListener.
Typical usage:
class DataListener : IDlisDataListener { public bool DataRead(DlisFrame dlisFrame, DilsFile dlisFile) { // Process frame data : // Clear curve data to save memory dlisFrame.ClearCurves(); // Continue the process return true; } }
A notification from DlisFileReader indicating that a new portion of data has been read into the specified DLIS frame.
After the client has processed the data, it may clear the curve data in order to save memory storage. See DlisFrame.ClearCurves.
It is also possible for the client to abort the reading process at this time, by returning false
from this method. This will close all resources and throw an OperationCanceledException back to the client.
NOTE: The portions of data that has been read is always a whole number of data rows, and data rows are always delivered in order. However, depending on the architecture of the DLIS file, rows of different frames may be interleaved. The dlisFile instances are always processed sequencially in order.
Consequently, the typical approach for processing a multi-frame DLIS file in a streaming manner is to first read the file structure (no bulk-data) and subsequenlty read the file once per existing frame. In each reading cycle only data from the frame in question should be processed and data from other frames should be ignored.
See also DlisFileReader.Read(bool,bool,IDlisDataListener,bool).
dlisFrame | DLIS frame that has been populated with new data. Never null. |
dlisFile | DLIS file owner of the frame. Never null. |