Struct rocksdb::Env

source · []
pub struct Env(_);
Expand description

An Env is an interface used by the rocksdb implementation to access operating system functionality like the filesystem etc. Callers may wish to provide a custom Env object when opening a database to get fine gain control; e.g., to rate limit file system operations.

All Env implementations are safe for concurrent access from multiple threads without any external synchronization.

Note: currently, C API behinds C++ API for various settings. See also: rocksdb/include/env.h

Implementations

Returns default env

Returns a new environment that stores its data in memory and delegates all non-file-storage tasks to base_env.

Sets the number of background worker threads of a specific thread pool for this environment. LOW is the default pool.

Default: 1

Sets the size of the high priority thread pool that can be used to prevent compactions from stalling memtable flushes.

Sets the size of the low priority thread pool that can be used to prevent compactions from stalling memtable flushes.

Sets the size of the bottom priority thread pool that can be used to prevent compactions from stalling memtable flushes.

Wait for all threads started by StartThread to terminate.

Lowering IO priority for threads from the specified pool.

Lowering IO priority for high priority thread pool.

Lowering CPU priority for threads from the specified pool.

Lowering CPU priority for high priority thread pool.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.