Table of Contents

Class ParallelScanOperation<TDocument>

Namespace
MongoDB.Driver.Core.Operations
Assembly
MongoDB.Driver.Core.dll

Represents a parallel scan operation.

public class ParallelScanOperation<TDocument> : IReadOperation<IReadOnlyList<IAsyncCursor<TDocument>>>

Type Parameters

TDocument

The type of the document.

Inheritance
ParallelScanOperation<TDocument>
Implements
Inherited Members
Extension Methods

Constructors

ParallelScanOperation(CollectionNamespace, int, IBsonSerializer<TDocument>, MessageEncoderSettings)

Initializes a new instance of the ParallelScanOperation<TDocument> class.

[Obsolete("ParallelScanOperation was deprecated in server version 4.1.")]
public ParallelScanOperation(CollectionNamespace collectionNamespace, int numberOfCursors, IBsonSerializer<TDocument> serializer, MessageEncoderSettings messageEncoderSettings)

Parameters

collectionNamespace CollectionNamespace

The collection namespace.

numberOfCursors int

The number of cursors.

serializer IBsonSerializer<TDocument>

The serializer.

messageEncoderSettings MessageEncoderSettings

The message encoder settings.

Properties

BatchSize

Gets or sets the size of a batch.

public int? BatchSize { get; set; }

Property Value

int?

The size of a batch.

CollectionNamespace

Gets the collection namespace.

public CollectionNamespace CollectionNamespace { get; }

Property Value

CollectionNamespace

The collection namespace.

MessageEncoderSettings

Gets the message encoder settings.

public MessageEncoderSettings MessageEncoderSettings { get; }

Property Value

MessageEncoderSettings

The message encoder settings.

NumberOfCursors

Gets the number of cursors.

public int NumberOfCursors { get; }

Property Value

int

The number of cursors.

ReadConcern

Gets or sets the read concern.

public ReadConcern ReadConcern { get; set; }

Property Value

ReadConcern

The read concern.

Serializer

Gets the serializer.

public IBsonSerializer<TDocument> Serializer { get; }

Property Value

IBsonSerializer<TDocument>

The serializer.

Methods

Execute(IReadBinding, CancellationToken)

Executes the operation.

public IReadOnlyList<IAsyncCursor<TDocument>> Execute(IReadBinding binding, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

IReadOnlyList<IAsyncCursor<TDocument>>

The result of the operation.

ExecuteAsync(IReadBinding, CancellationToken)

Executes the operation.

public Task<IReadOnlyList<IAsyncCursor<TDocument>>> ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<IReadOnlyList<IAsyncCursor<TDocument>>>

A Task whose result is the result of the operation.