Struct rsdb::LockFreeLog
[−]
[src]
pub struct LockFreeLog { /* fields omitted */ }
LockFreeLog
is responsible for putting data on disk, and retrieving
it later on.
Methods
impl LockFreeLog
[src]
fn start_system(config: Config) -> LockFreeLog
create new lock-free log
fn flush(&self)
Flush the next io buffer.
Trait Implementations
impl Send for LockFreeLog
[src]
impl Sync for LockFreeLog
[src]
impl Drop for LockFreeLog
[src]
impl Log for LockFreeLog
[src]
fn reserve(&self, buf: Vec<u8>) -> Reservation
Create a log offset reservation for a particular write, which may later be filled or canceled. Read more
fn config(&self) -> &Config
return the config in use for this log
fn write(&self, buf: Vec<u8>) -> u64
Write a buffer to underlying storage.
fn read(&self, id: u64) -> Result<LogRead>
read a buffer from the disk
fn stable_offset(&self) -> u64
returns the current stable offset written to disk
fn make_stable(&self, id: u64)
blocks until the specified id has been made stable on disk
fn punch_hole(&self, id: u64)
deallocates the data part of a log id
fn iter_from(&self, id: u64) -> LogIter<Self>
Return an iterator over the log, starting with a specified offset. Read more