Click or drag to resize

IResultWriteBridge Interface

Interface that is to be implemted for a bridge that can write data from the ResultData access to persistant storage.

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
Assembly:  DHI.Mike1D.ResultDataAccess (in DHI.Mike1D.ResultDataAccess.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public interface IResultWriteBridge : IResultBridge

The IResultWriteBridge type exposes the following members.

Properties
  NameDescription
Public propertySecondsBetweenFileFlush
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.

Top
Methods
  NameDescription
Public methodFinish
Used to disconnect from/close persistant storage and free resources if needed.
(Inherited from IResultBridge.)
Public methodFlush
Flush must store data from result data (memory) and into persistant storage (file or database)
Public methodPrepare
Prepare the persistant storage for flush operations.
Public methodSave
Writes the entire content of the result data into a persistent storage
Top
See Also