[−][src]Struct sstb::sstable::reader::ConcurrentSSTableReader
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]
filename: P,
opts: &ReadOptions
) -> Result<Self>
pub fn get(&self, key: &[u8]) -> Result<Option<Bytes>>
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ConcurrentSSTableReader
impl Send for ConcurrentSSTableReader
impl Sync for ConcurrentSSTableReader
impl Unpin for ConcurrentSSTableReader
impl !UnwindSafe for ConcurrentSSTableReader
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,