Operate parameters. More...
#include <mdbx.h++>
Public Member Functions | |
MDBX_CXX11_CONSTEXPR | operate_parameters () noexcept |
MDBX_CXX11_CONSTEXPR | operate_parameters (const unsigned max_maps, const unsigned max_readers=0, const env::mode mode=env::mode::write_mapped_io, env::durability durability=env::durability::robust_synchronous, const env::reclaiming_options &reclaiming=env::reclaiming_options(), const env::operate_options &options=env::operate_options()) noexcept |
MDBX_CXX11_CONSTEXPR | operate_parameters (const operate_parameters &) noexcept=default |
MDBX_CXX14_CONSTEXPR operate_parameters & | operator= (const operate_parameters &) noexcept=default |
MDBX_env_flags_t | make_flags (bool accede=true, bool use_subdirectory=false) const |
Static Public Member Functions | |
static env::mode | mode_from_flags (MDBX_env_flags_t) noexcept |
static env::durability | durability_from_flags (MDBX_env_flags_t) noexcept |
static env::reclaiming_options | reclaiming_from_flags (MDBX_env_flags_t flags) noexcept |
static env::operate_options | options_from_flags (MDBX_env_flags_t flags) noexcept |
Public Attributes | |
unsigned | max_maps {0} |
The maximum number of named databases for the environment. Zero means default value. More... | |
unsigned | max_readers {0} |
The maximum number of threads/reader slots for the environment. Zero means default value. More... | |
env::mode | mode {write_mapped_io} |
env::durability | durability {robust_synchronous} |
env::reclaiming_options | reclaiming |
env::operate_options | options |
Operate parameters.
|
inlinenoexcept |
|
inlinenoexcept |
|
defaultnoexcept |
|
staticnoexcept |
MDBX_env_flags_t mdbx::env::operate_parameters::make_flags | ( | bool | accede = true , |
bool | use_subdirectory = false |
||
) | const |
accede | Using database/environment which already opened by another process(es). |
The MDBX_ACCEDE
flag is useful to avoid MDBX_INCOMPATIBLE error while opening the database/environment which is already used by another process(es) with unknown mode/flags. In such cases, if there is a difference in the specified flags (MDBX_NOMETASYNC, MDBX_SAFE_NOSYNC, MDBX_UTTERLY_NOSYNC, MDBX_LIFORECLAIM, MDBX_COALESCE and MDBX_NORDAHEAD), instead of returning an error, the database will be opened in a compatibility with the already used mode.
MDBX_ACCEDE
has no effect if the current process is the only one either opening the DB in read-only mode or other process(es) uses the DB in read-only mode.
use_subdirectory | use subdirectory to place the DB files |
|
staticnoexcept |
|
defaultnoexcept |
|
inlinestaticnoexcept |
|
inlinestaticnoexcept |
env::durability mdbx::env::operate_parameters::durability {robust_synchronous} |
unsigned mdbx::env::operate_parameters::max_maps {0} |
The maximum number of named databases for the environment. Zero means default value.
unsigned mdbx::env::operate_parameters::max_readers {0} |
The maximum number of threads/reader slots for the environment. Zero means default value.
env::mode mdbx::env::operate_parameters::mode {write_mapped_io} |
env::operate_options mdbx::env::operate_parameters::options |
env::reclaiming_options mdbx::env::operate_parameters::reclaiming |