Table of Contents

Class OutputBufferChunkSource

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

Represents a source of chunks optimized for output buffers.

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

Constructors

OutputBufferChunkSource(IBsonChunkSource, int, int, int)

Initializes a new instance of the OutputBufferChunkSource class.

public OutputBufferChunkSource(IBsonChunkSource baseSource, int initialUnpooledChunkSize = 1024, int minChunkSize = 16384, int maxChunkSize = 1048576)

Parameters

baseSource IBsonChunkSource

The chunk source.

initialUnpooledChunkSize int

The size of the initial 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.

InitialUnpooledChunkSize

Gets the initial unpooled chunk size.

public int InitialUnpooledChunkSize { get; }

Property Value

int

The initial unpooled chunk size.

MaxChunkSize

Gets the maximum size of a chunk.

public int MaxChunkSize { get; }

Property Value

int

The maximum size of a 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.