Resource class for MDB_env*
handles.
More...
#include <lmdb++.h>
Resource class for MDB_env*
handles.
- Note
- Instances of this class are movable, but not copyable.
- See also
- http://symas.com/mdb/doc/group__internal.html#structMDB__env
◆ env() [1/2]
lmdb::env::env |
( |
MDB_env *const | handle | ) |
|
|
inlinenoexcept |
Constructor.
- Parameters
-
handle | a valid MDB_env* handle |
◆ env() [2/2]
lmdb::env::env |
( |
env && | other | ) |
|
|
inlinenoexcept |
◆ ~env()
◆ close()
void lmdb::env::close |
( |
| ) |
|
|
inlinenoexcept |
Closes this environment, releasing the memory map.
- Note
- this method is idempotent
- Postcondition
handle() == nullptr
◆ create()
Creates a new LMDB environment.
- Parameters
-
- Exceptions
-
◆ handle()
MDB_env * lmdb::env::handle |
( |
| ) |
const |
|
inlinenoexcept |
Returns the underlying MDB_env*
handle.
◆ open()
Opens this environment.
- Parameters
-
- Exceptions
-
◆ operator MDB_env *()
lmdb::env::operator MDB_env * |
( |
| ) |
const |
|
inlinenoexcept |
Returns the underlying MDB_env*
handle.
◆ operator=()
env & lmdb::env::operator= |
( |
env && | other | ) |
|
|
inlinenoexcept |
Move assignment operator.
◆ reader_check()
int lmdb::env::reader_check |
( |
| ) |
|
|
inline |
◆ set_flags()
env & lmdb::env::set_flags |
( |
const unsigned int | flags, |
|
|
const bool | onoff = true ) |
|
inline |
◆ set_mapsize()
env & lmdb::env::set_mapsize |
( |
const std::size_t | size | ) |
|
|
inline |
◆ set_max_dbs()
env & lmdb::env::set_max_dbs |
( |
const MDB_dbi | count | ) |
|
|
inline |
◆ set_max_readers()
env & lmdb::env::set_max_readers |
( |
const unsigned int | count | ) |
|
|
inline |
◆ sync()
void lmdb::env::sync |
( |
const bool | force = true | ) |
|
|
inline |
Flushes data buffers to disk.
- Parameters
-
- Exceptions
-
◆ _handle
MDB_env* lmdb::env::_handle {nullptr} |
|
protected |
◆ default_flags
unsigned int lmdb::env::default_flags = 0 |
|
staticconstexpr |
◆ default_mode
mode lmdb::env::default_mode = 0644 |
|
staticconstexpr |
The documentation for this class was generated from the following file: