Trait SegmentSourceFactory

Source
pub trait SegmentSourceFactory:
    'static
    + Send
    + Sync {
    // Required method
    fn segment_source(&self, metrics: VortexMetrics) -> Arc<dyn SegmentSource>;
}
Expand description

A factory for creating segment sources that read data from a Vortex file.

This trait abstracts over different implementations of segment sources, allowing for different I/O strategies (e.g., synchronous, asynchronous, memory-mapped) to be used with the same file interface.

Required Methods§

Source

fn segment_source(&self, metrics: VortexMetrics) -> Arc<dyn SegmentSource>

Create a segment source for reading segments from the file.

§Arguments
  • metrics - Metrics for monitoring the performance of the segment source.
§Returns

A new segment source that can be used to read data from the file.

Implementors§