ITimeSeriesDataCollectionStorageWriter<TValue> Interface
HAKOM.TSM.Net.Api.Data.Persistence.TimeSeries
Section titled “HAKOM.TSM.Net.Api.Data.Persistence.TimeSeries”Provides methods to either collect single ITimeSeriesData<TValue> entries and write them all at once or stream the ITimeSeriesData<TValue> entries, depending on the storage.
public interface ITimeSeriesDataCollectionStorageWriter<TValue> : HAKOM.TSM.Net.Api.Data.Persistence.TimeSeries.ITimeSeriesDataCollectionStorageWriter, System.IDisposable, System.IAsyncDisposable where TValue : System.IComparable<TValue>, System.IEquatable<TValue>Type parameters
Section titled “Type parameters”TValue
The value type of the data.
Implements ITimeSeriesDataCollectionStorageWriter, System.IDisposable, System.IAsyncDisposable
Methods
Section titled “Methods”ITimeSeriesDataCollectionStorageWriter<TValue>.Configure(ITimeSeriesReference, ITsmRepositoryInformation, ITimeSeriesDataStoreConfiguration, DateTimeOffset) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.Configure(ITimeSeriesReference, ITsmRepositoryInformation, ITimeSeriesDataStoreConfiguration, DateTimeOffset) Method”Configures the current ITimeSeriesDataCollectionStorageWriter<TValue>.
void Configure(HAKOM.TSM.Net.Api.TimeSeries.Persistence.References.ITimeSeriesReference timeSeriesReference, HAKOM.TSM.Net.Api.Persistence.ITsmRepositoryInformation repositoryInformation, HAKOM.TSM.Net.Api.Data.Persistence.TimeSeries.ITimeSeriesDataStoreConfiguration configuration, System.DateTimeOffset historicDateTime);Parameters
Section titled “Parameters”timeSeriesReference ITimeSeriesReference
The ITimeSeriesReference containing additional information where the data should be stored to.
repositoryInformation ITsmRepositoryInformation
The ITsmRepositoryInformation containing the repository where the data should be stored to.
configuration ITimeSeriesDataStoreConfiguration
The ITimeSeriesDataStoreConfiguration with information about where to store the data in the repository.
historicDateTime System.DateTimeOffset
The date used for historical retention of the data.
ITimeSeriesDataCollectionStorageWriter<TValue>.Flush(CancellationToken) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.Flush(CancellationToken) Method”Clears buffers and causes any buffered data to be written to the storage.
System.Threading.Tasks.Task Flush(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.
Returns
Section titled “Returns”ITimeSeriesDataCollectionStorageWriter<TValue>.TryFlush(CancellationToken) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.TryFlush(CancellationToken) Method”Attempts to clear buffers and write buffered data to the storage.
System.Threading.Tasks.Task<HAKOM.ErrorHandling.Core.Net.Api.Result> TryFlush(System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.
Returns
Section titled “Returns”System.Threading.Tasks.Task<Result>
An awaitable System.Threading.Tasks.Task<> containing information about the success or failure of the attempt.
ITimeSeriesDataCollectionStorageWriter<TValue>.Write(ITimeSeriesData<TValue>, CancellationToken) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.Write(ITimeSeriesData<TValue>, CancellationToken) Method”Writes data to the storage of the configured store or adds it to a buffer which will be saved with Flush(CancellationToken).
System.Threading.Tasks.Task Write(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue> data, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”data HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>
The ITimeSeriesData<TValue> to save.
cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.
Returns
Section titled “Returns”ITimeSeriesDataCollectionStorageWriter<TValue>.Write(IAsyncEnumerable<ITimeSeriesData<TValue>>, CancellationToken) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.Write(IAsyncEnumerable<ITimeSeriesData<TValue>>, CancellationToken) Method”Writes a collection to the storage of the configured store or adds it to a buffer which will be saved with Flush(CancellationToken).
System.Threading.Tasks.Task Write(System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>> collection, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”collection System.Collections.Generic.IAsyncEnumerable<HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>>
cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.
Returns
Section titled “Returns”ITimeSeriesDataCollectionStorageWriter<TValue>.WriteHistoricData(ITimeSeriesData<TValue>, CancellationToken) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.WriteHistoricData(ITimeSeriesData<TValue>, CancellationToken) Method”Writes data to the history storage of the configured store or adds it to a buffer which will be saved with Flush(CancellationToken).
System.Threading.Tasks.Task WriteHistoricData(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue> data, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”data HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>
The ITimeSeriesData<TValue> to save.
cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.
Returns
Section titled “Returns”ITimeSeriesDataCollectionStorageWriter<TValue>.WriteWithHistoricData(ITimeSeriesData<TValue>, CancellationToken) Method
Section titled “ITimeSeriesDataCollectionStorageWriter<TValue>.WriteWithHistoricData(ITimeSeriesData<TValue>, CancellationToken) Method”Writes data to the storage and history storage of the configured store or adds it to a buffer which will be saved with Flush(CancellationToken).
System.Threading.Tasks.Task WriteWithHistoricData(HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue> data, System.Threading.CancellationToken cancellationToken=default(System.Threading.CancellationToken));Parameters
Section titled “Parameters”data HAKOM.TSM.Net.Api.Data.TimeSeries.ITimeSeriesData<TValue>
The ITimeSeriesData<TValue> to save.
cancellationToken System.Threading.CancellationToken
Propagates a notification if the operations should be canceled.