Table of Contents

Class RetryableReadContext

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

Represents a context for retryable reads.

public sealed class RetryableReadContext : IDisposable
Inheritance
RetryableReadContext
Implements
Inherited Members

Constructors

RetryableReadContext(IReadBinding, bool)

Initializes a new instance of the RetryableReadContext class.

public RetryableReadContext(IReadBinding binding, bool retryRequested)

Parameters

binding IReadBinding

The binding.

retryRequested bool

if set to true the operation can be retried.

See Also

Properties

Binding

Gets the binding.

public IReadBinding Binding { get; }

Property Value

IReadBinding

The binding.

See Also

Channel

Gets the channel.

public IChannelHandle Channel { get; }

Property Value

IChannelHandle

The channel.

See Also

ChannelSource

Gets the channel source.

public IChannelSourceHandle ChannelSource { get; }

Property Value

IChannelSourceHandle

The channel source.

See Also

RetryRequested

Gets a value indicating whether the operation can be retried.

public bool RetryRequested { get; }

Property Value

bool

true if the operation can be retried; otherwise, false.

See Also

Methods

Create(IReadBinding, bool, CancellationToken)

Creates and initializes a retryable read operation context.

public static RetryableReadContext Create(IReadBinding binding, bool retryRequested, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

retryRequested bool

if set to true [retry requested].

cancellationToken CancellationToken

The cancellation token.

Returns

RetryableReadContext

A retryable read context.

See Also

CreateAsync(IReadBinding, bool, CancellationToken)

Creates and initializes a retryable read operation context.

public static Task<RetryableReadContext> CreateAsync(IReadBinding binding, bool retryRequested, CancellationToken cancellationToken)

Parameters

binding IReadBinding

The binding.

retryRequested bool

if set to true [retry requested].

cancellationToken CancellationToken

The cancellation token.

Returns

Task<RetryableReadContext>

A retryable read context.

See Also

Dispose()

public void Dispose()
See Also

ReplaceChannel(IChannelHandle)

Replaces the channel.

public void ReplaceChannel(IChannelHandle channel)

Parameters

channel IChannelHandle

The channel.

See Also

ReplaceChannelSource(IChannelSourceHandle)

Replaces the channel source.

public void ReplaceChannelSource(IChannelSourceHandle channelSource)

Parameters

channelSource IChannelSourceHandle

The channel source.

See Also

See Also