Struct segments::MemoryLog [−][src]
pub struct MemoryLog<T> { /* fields omitted */ }
Expand description
Log is an inmemory commitlog (per topic) which splits data in segments. It drops the oldest segment when retention policies are crossed. Each segment is identified by base offset and a new segment is created when ever current segment crosses disk limit
Implementations
Appends this record to the tail and returns the offset of this append. When the current segment is full, this also create a new segment and writes the record to it. This function also handles retention by removing head segment
Reads multiple packets from the disk and returns base offset and offset of the next log. When data of deleted segment is asked, returns data of the current head Note: segment id is used to be able to pull directly from correct segment Note: This method also returns full segment data when requested data is not of active segment. Set your max_segment size keeping tail latencies of all the concurrent connections mind (some runtimes support internal preemption using await points)
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for MemoryLog<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for MemoryLog<T> where
T: UnwindSafe,