Show / Hide Table of Contents

Interface IUploadQueue<T>

Interface for generic upload queue

Inherited Members
IUploadQueue.Start(CancellationToken)
IDisposable.Dispose()
IAsyncDisposable.DisposeAsync()
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 Source

Dequeue()

Empty the queue and return the contents

Declaration
IEnumerable<T> Dequeue()
Returns
Type Description
IEnumerable<T>

Contents of the queue

| Edit this page View Source

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

| Edit this page View Source

Enqueue(T)

Enqueue a single item in the internal queue.

Declaration
void Enqueue(T item)
Parameters
Type Name Description
T item

Item to enqueue

| Edit this page View Source

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

Extension Methods

DataModelUtils.GetOrCreateResourcesAsync<T, T2>(T2, IEnumerable<InstanceIdentifier>, Func<IEnumerable<InstanceIdentifier>, IEnumerable<SourcedNodeWrite<T>>>, Func<IEnumerable<SourcedNodeWrite<T>>, SanitationMode, (IEnumerable<SourcedNodeWrite<T>>, IEnumerable<CogniteError<SourcedNodeWrite<T>>>)>, int, int, RetryMode, SanitationMode, CancellationToken)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX