libmdbx  0.11.6.39 (2022-04-13T11:05:50+03:00)
One of the fastest compact embeddable key-value ACID database without WAL.
mdbx::env::operate_parameters Struct Reference

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_parametersoperator= (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
 

Detailed Description

Operate parameters.

Constructor & Destructor Documentation

◆ operate_parameters() [1/3]

MDBX_CXX11_CONSTEXPR mdbx::env::operate_parameters::operate_parameters ( )
inlinenoexcept

◆ operate_parameters() [2/3]

MDBX_CXX11_CONSTEXPR mdbx::env::operate_parameters::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() 
)
inlinenoexcept

◆ operate_parameters() [3/3]

MDBX_CXX11_CONSTEXPR mdbx::env::operate_parameters::operate_parameters ( const operate_parameters )
defaultnoexcept

Member Function Documentation

◆ durability_from_flags()

static env::durability mdbx::env::operate_parameters::durability_from_flags ( MDBX_env_flags_t  )
staticnoexcept

◆ make_flags()

MDBX_env_flags_t mdbx::env::operate_parameters::make_flags ( bool  accede = true,
bool  use_subdirectory = false 
) const
Parameters
accedeUsing 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.

Parameters
use_subdirectoryuse subdirectory to place the DB files

◆ mode_from_flags()

static env::mode mdbx::env::operate_parameters::mode_from_flags ( MDBX_env_flags_t  )
staticnoexcept

◆ operator=()

MDBX_CXX14_CONSTEXPR operate_parameters& mdbx::env::operate_parameters::operator= ( const operate_parameters )
defaultnoexcept

◆ options_from_flags()

env::operate_options mdbx::env::operate_parameters::options_from_flags ( MDBX_env_flags_t  flags)
inlinestaticnoexcept

◆ reclaiming_from_flags()

env::reclaiming_options mdbx::env::operate_parameters::reclaiming_from_flags ( MDBX_env_flags_t  flags)
inlinestaticnoexcept

Member Data Documentation

◆ durability

env::durability mdbx::env::operate_parameters::durability {robust_synchronous}

◆ max_maps

unsigned mdbx::env::operate_parameters::max_maps {0}

The maximum number of named databases for the environment. Zero means default value.

◆ max_readers

unsigned mdbx::env::operate_parameters::max_readers {0}

The maximum number of threads/reader slots for the environment. Zero means default value.

◆ mode

env::mode mdbx::env::operate_parameters::mode {write_mapped_io}

◆ options

env::operate_options mdbx::env::operate_parameters::options

◆ reclaiming

env::reclaiming_options mdbx::env::operate_parameters::reclaiming

The documentation for this struct was generated from the following file: