Skip to content

SegmentedRingVectorOptions

SegmentedRingVectorOptions = object

Defined in: packages/data/src/storage/segmented-ring-vector.ts:5

optional capacity?: number

Defined in: packages/data/src/storage/segmented-ring-vector.ts:15

Pre-allocate exactly this many slots and never grow.

This is what makes a fixed-size collection: hand the vector to any Bounded*/Blocking* collection without repeating the number, and it takes its capacity from here. Omit it and the vector grows geometrically instead, in which case it must not be used as a bounded collection’s storage — there is nothing for that collection to bound itself by.


optional chunkSize?: number

Defined in: packages/data/src/storage/segmented-ring-vector.ts:21

The number of elements each chunk should hold. This determines the granularity of the segmented storage.