Interface IUploadQueue<T>
Interface for generic upload queue
Inherited Members
Namespace: Cognite.Extractor.Utils
Assembly: ExtractorUtils.dll
Syntax
public interface IUploadQueue<T> : IUploadQueue, IDisposable, IAsyncDisposable
Type Parameters
Name | Description |
---|---|
T | Type of resource to upload |
Methods
| Edit this page View SourceDequeue()
Empty the queue and return the contents
Declaration
IEnumerable<T> Dequeue()
Returns
Type | Description |
---|---|
IEnumerable<T> | Contents of the queue |
Enqueue(IEnumerable<T>)
Enqueue a list of items in the internal queue.
Declaration
void Enqueue(IEnumerable<T> items)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<T> | items | Items to enqueue |
Enqueue(T)
Enqueue a single item in the internal queue.
Declaration
void Enqueue(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | Item to enqueue |
Trigger(CancellationToken)
Trigger queue upload and return the result instead of calling the callback. Can be used as alternative for callback entirely.
Declaration
Task<QueueUploadResult<T>> Trigger(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | token |
Returns
Type | Description |
---|---|
Task<QueueUploadResult<T>> | A QueueUploadResult<T> containing an error or the uploaded entries |