Class EventUploadQueue
Queue for uploading events to CDF.
Inherited Members
Namespace: Cognite.Extractor.Utils
Assembly: ExtractorUtils.dll
Syntax
public class EventUploadQueue : BaseUploadQueue<EventCreate>, IUploadQueue<EventCreate>, IUploadQueue, IDisposable, IAsyncDisposable
Constructors
| Edit this page View SourceEventUploadQueue(CogniteDestination, TimeSpan, int, ILogger<CogniteDestination>, Func<QueueUploadResult<EventCreate>, Task>?, string?)
Upload queue for events
Declaration
public EventUploadQueue(CogniteDestination destination, TimeSpan interval, int maxSize, ILogger<CogniteDestination> logger, Func<QueueUploadResult<EventCreate>, Task>? callback, string? bufferPath)
Parameters
Type | Name | Description |
---|---|---|
CogniteDestination | destination | CogniteDestination to use for uploading |
TimeSpan | interval | Interval between each automated push, leave at zero to disable timed pushing |
int | maxSize | Max size of queue before pushing, set to zero to disable max size |
ILogger<CogniteDestination> | logger | Logger to use |
Func<QueueUploadResult<EventCreate>, Task> | callback | Callback after uploading |
string | bufferPath | Path to local buffer file for binary buffering of events |
Methods
| Edit this page View SourceEnqueue(EventCreate)
Enqueue an event
Declaration
public override void Enqueue(EventCreate evt)
Parameters
Type | Name | Description |
---|---|---|
EventCreate | evt |
Overrides
| Edit this page View SourceUploadEntries(IEnumerable<EventCreate>, CancellationToken)
Upload events to CDF.
Declaration
protected override Task<QueueUploadResult<EventCreate>> UploadEntries(IEnumerable<EventCreate> items, CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<EventCreate> | items | Events to upload |
CancellationToken | token |
Returns
Type | Description |
---|---|
Task<QueueUploadResult<EventCreate>> | An error or the uploaded events |