Table of Contents

Class InputBufferChunkSource

Namespace
MongoDB.Bson.IO
Assembly
MongoDB.Bson.dll

Represents a source of chunks optimized for input buffers.

public sealed class InputBufferChunkSource : IBsonChunkSource, IDisposable
Inheritance
InputBufferChunkSource
Implements
Inherited Members
Extension Methods

Constructors

InputBufferChunkSource(IBsonChunkSource, int, int, int)

Initializes a new instance of the InputBufferChunkSource class.

public InputBufferChunkSource(IBsonChunkSource baseSource, int maxUnpooledChunkSize = 4096, int minChunkSize = 16384, int maxChunkSize = 1048576)

Parameters

baseSource IBsonChunkSource

The chunk source.

maxUnpooledChunkSize int

The maximum size of an unpooled chunk.

minChunkSize int

The minimum size of a chunk.

maxChunkSize int

The maximum size of a chunk.

Properties

BaseSource

Gets the base source.

public IBsonChunkSource BaseSource { get; }

Property Value

IBsonChunkSource

The base source.

MaxChunkSize

Gets the maximum size of a chunk.

public int MaxChunkSize { get; }

Property Value

int

The maximum size of a chunk.

MaxUnpooledChunkSize

Gets the maximum size of an unpooled chunk.

public int MaxUnpooledChunkSize { get; }

Property Value

int

The maximum size of an unpooled chunk.

MinChunkSize

Gets the minimum size of a chunk.

public int MinChunkSize { get; }

Property Value

int

The minimum size of a chunk.

Methods

Dispose()

public void Dispose()

GetChunk(int)

Gets the chunk.

public IBsonChunk GetChunk(int requestedSize)

Parameters

requestedSize int

Size of the requested.

Returns

IBsonChunk

A chunk.

Remarks

The chunk source is free to return a larger or smaller chunk than requested.