Class BsonChunkPool
Represents a pool of chunks.
public sealed class BsonChunkPool : IBsonChunkSource, IDisposable
- Inheritance
-
BsonChunkPool
- Implements
- Inherited Members
- Extension Methods
Constructors
BsonChunkPool(int, int)
Initializes a new instance of the BsonChunkPool class.
public BsonChunkPool(int maxChunkCount, int chunkSize)
Parameters
maxChunkCount
intThe maximum number of chunks to keep in the pool.
chunkSize
intThe size of each chunk.
Properties
ChunkCount
Gets the size of the pool.
public int ChunkCount { get; }
Property Value
- int
The size of the pool.
ChunkSize
Gets the chunk size.
public int ChunkSize { get; }
Property Value
- int
The chunk size.
Default
Gets or sets the default chunk pool.
public static BsonChunkPool Default { get; set; }
Property Value
- BsonChunkPool
The default chunk pool.
MaxChunkCount
Gets the maximum size of the pool.
public int MaxChunkCount { get; }
Property Value
- int
The maximum size of the pool.
Methods
Dispose()
public void Dispose()
GetChunk(int)
Gets the chunk.
public IBsonChunk GetChunk(int requestedSize)
Parameters
requestedSize
intSize of the requested.
Returns
- IBsonChunk
A chunk.
Remarks
The chunk source is free to return a larger or smaller chunk than requested.