[][src]Struct sstb::sstable::reader::ConcurrentSSTableReader

pub struct ConcurrentSSTableReader { /* fields omitted */ }

A reader that can be used efficiently from multiple threads.

There is internal mutability inside. The LRU caches are sharded into multiple locks.

You get Bytes references in return instead of slices, so that atomic reference counting can happen behind the scenes for properly tracking chunks still in-use.

If you want to use this with multiple threads just put it into an Arc.

If your data is uncompressed, you probably better use MmapUncompressedSSTableReader, which is a lot simpler wait-free implementation.

However mmap's one superiority needs to be confirmed in benchmarks. There are benchmarks, but conclusions are TBD.

Methods

impl ConcurrentSSTableReader[src]

pub fn new<P: AsRef<Path>>(filename: P) -> Result<Self>[src]

pub fn new_with_options<P: AsRef<Path>>(
    filename: P,
    opts: &ReadOptions
) -> Result<Self>
[src]

pub fn get(&self, key: &[u8]) -> Result<Option<Bytes>>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,