IResultWriteBridge Interface |
The Save method is used for storing the entire content of the result data object to persistant storage. When Save is called, the bridge should initialize and open the persistant storage, write data to the storage and finalise and close the storage.
The methods Prepare(IDiagnostics), Flush(Boolean) and Finish are used for storing data from the result data into persistent storage during a simulation.
The Prepare(IDiagnostics) is called during the prepare phase of the simulation, where all static data is available. The method must initialise the storage, open it for writing and write any required static data (not time dependent data) to the storage.
The Flush(Boolean) method is called regurlarly during the simulation, depending on the SecondsBetweenFileFlush parameter. There can be data for more than one time step in the result data object. The method must store all data present in the result data object. After the flush method, the current data in the result data object is removed. A final call to flush is issued when the simulation is done.
The Finish method will be called when the simulation is done and after the last flush call. It must finalize and close down the persistant storage.
Namespace: DHI.Mike1D.ResultDataAccess
The IResultWriteBridge type exposes the following members.
Name | Description | |
---|---|---|
SecondsBetweenFileFlush |
Seconds between flush to file. Set this lower if you need to read the result file while your
calculations are running.
Set to zero to disable file flushing. WARNING: File flush is a potentially expensive operation. Use with care. |
Name | Description | |
---|---|---|
Finish |
Used to disconnect from/close persistant storage and free resources if needed.
(Inherited from IResultBridge.) | |
Flush |
Flush must store data from result data (memory) and into persistant storage (file or database)
| |
Prepare |
Prepare the persistant storage for flush operations.
| |
Save |
Writes the entire content of the result data into a persistent storage
|