[][src]Struct rocks::options::WriteOptions

pub struct WriteOptions { /* fields omitted */ }

Options that control write operations

Implementations

impl WriteOptions[src]

pub fn default_instance() -> &'static WriteOptions[src]

default WriteOptions optimization

pub fn sync(self, val: bool) -> Self[src]

If true, the write will be flushed from the operating system buffer cache (by calling WritableFile::Sync()) before the write is considered complete. If this flag is true, writes will be slower.

If this flag is false, and the machine crashes, some recent writes may be lost. Note that if it is just the process that crashes (i.e., the machine does not reboot), no writes will be lost even if sync==false.

In other words, a DB write with sync==false has similar crash semantics as the "write()" system call. A DB write with sync==true has similar crash semantics to a "write()" system call followed by "fdatasync()".

Default: false

pub fn disable_wal(self, val: bool) -> Self[src]

If true, writes will not first go to the write ahead log, and the write may got lost after a crash.

pub fn ignore_missing_column_families(self, val: bool) -> Self[src]

If true and if user is trying to write to column families that don't exist (they were dropped), ignore the write (don't return an error). If there are multiple writes in a WriteBatch, other writes will succeed.

Default: false

pub fn no_slowdown(self, val: bool) -> Self[src]

If true and we need to wait or sleep for the write request, fails immediately with Status::Incomplete().

pub fn low_pri(self, val: bool) -> Self[src]

If true, this write request is of lower priority if compaction is behind. In this case, no_slowdown = true, the request will be cancelled immediately with Status::Incomplete() returned. Otherwise, it will be slowed down. The slowdown value is determined by RocksDB to guarantee it introduces minimum impacts to high priority writes.

Default: false

pub fn memtable_insert_hint_per_batch(self, val: bool) -> Self[src]

If true, this writebatch will maintain the last insert positions of each memtable as hints in concurrent write. It can improve write performance in concurrent writes if keys in one writebatch are sequential. In non-concurrent writes (when concurrent_memtable_writes is false) this option will be ignored.

Default: false

Trait Implementations

impl AsRef<WriteOptions> for WriteOptions[src]

impl Default for WriteOptions[src]

impl Drop for WriteOptions[src]

impl Sync for WriteOptions[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.