public interface DlisDataListener
Convenient for handling DLIS files that are larger than physical memory. In this case the client should clear the DLIS frame at each invocation.
Typical usage:
class DataListener implements DlisDataListener { @Override public boolean dataRead(DlisFrame dlisFrame, DilsFile dlisFile) { // Process frame data : // Clear curve data to save memory dlisFrame.clearCurves(); // Continue the process return true; } }
Modifier and Type | Method and Description |
---|---|
boolean |
dataRead(DlisFrame dlisFrame,
DlisFile dlisFile)
A notification from
DlisFileReader indicating that a new
portion of data has been read into the specified DLIS frame. |
boolean dataRead(DlisFrame dlisFrame, DlisFile dlisFile)
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 clean the frame
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 InterruptedException 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.
dlisFrame
- DLIS frame that has been populated with new data.
Never null.dlisFile
- DLIS file owner of the frame. Never null.DlisFileReader.read(boolean,boolean,DlisDataListener)
Copyright © 2024 Petroware AS - https://petroware.no