Table of Contents

Method GetWriteChannelSource

Namespace
MongoDB.Driver.Core.Bindings
Assembly
MongoDB.Driver.Core.dll

GetWriteChannelSource(CancellationToken)

Gets a channel source for write operations.

IChannelSourceHandle GetWriteChannelSource(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token.

Returns

IChannelSourceHandle

A channel source.

GetWriteChannelSource(IReadOnlyCollection<ServerDescription>, CancellationToken)

Gets a channel source for write operations while deprioritizing servers in the provided collection.

IChannelSourceHandle GetWriteChannelSource(IReadOnlyCollection<ServerDescription> deprioritizedServers, CancellationToken cancellationToken)

Parameters

deprioritizedServers IReadOnlyCollection<ServerDescription>

The deprioritized servers.

cancellationToken CancellationToken

The cancellation token.

Returns

IChannelSourceHandle

A channel source.

GetWriteChannelSource(IMayUseSecondaryCriteria, CancellationToken)

Gets a channel source for write operations that may use a secondary.

IChannelSourceHandle GetWriteChannelSource(IMayUseSecondaryCriteria mayUseSecondary, CancellationToken cancellationToken)

Parameters

mayUseSecondary IMayUseSecondaryCriteria

The may use secondary criteria.

cancellationToken CancellationToken

The cancellation token.

Returns

IChannelSourceHandle

A channel source.

GetWriteChannelSource(IReadOnlyCollection<ServerDescription>, IMayUseSecondaryCriteria, CancellationToken)

Gets a channel source for write operations that may use a secondary and deprioritizes servers in the provided collection.

IChannelSourceHandle GetWriteChannelSource(IReadOnlyCollection<ServerDescription> deprioritizedServers, IMayUseSecondaryCriteria mayUseSecondary, CancellationToken cancellationToken)

Parameters

deprioritizedServers IReadOnlyCollection<ServerDescription>

The deprioritized servers.

mayUseSecondary IMayUseSecondaryCriteria

The may use secondary criteria.

cancellationToken CancellationToken

The cancellation token.

Returns

IChannelSourceHandle

A channel source.