Skip to main content

Module segments

Module segments 

Source
Expand description

Segment access abstractions for layouts.

Layouts refer to byte ranges by SegmentId. A SegmentSource resolves those ids to buffer handles for readers, while a SegmentSink assigns ids when writers emit buffers. SegmentCache implementations can sit in front of sources to reuse segment bytes across scans.

Structs§

FileSegmentCache
One file’s view of a MokaSegmentCache; see MokaSegmentCache::for_file.
InstrumentedSegmentCache
Wrapper for SegmentCache that tracks its hit rate.
MokaSegmentCache
An in-memory Moka cache of segments, capped by total buffer bytes, that any number of files can share.
NoOpSegmentCache
Segment cache implementation that never stores anything.
SegmentCacheSourceAdapter
SegmentSource wrapper that consults a SegmentCache before the underlying source.
SegmentId
Identifier for a single physical segment referenced by a layout.
SegmentSourceId
Identifies the contents of one segment source, usually a file, in a cache that many sources share.
SharedSegmentSource
A SegmentSource that allows multiple requesters to await the same underlying segment request.
TestSegments
A dummy in-memory implementation of a segment reader and writer.

Enums§

SegmentEviction
Which segments a MokaSegmentCache evicts when it is full.

Traits§

SegmentCache
Cache for individual segment byte buffers.
SegmentSink
Assigns segment ids and writes segment buffers during layout writing.
SegmentSource
Provides segment data to a crate::LayoutReader.

Type Aliases§

SegmentFuture
Static future resolving to a segment byte buffer.
SegmentSinkRef
Shared writer-side segment sink.