PMDK C++ bindings
1.10.1
This is the C++ bindings documentation for PMDK's libpmemobj.
|
PMEMobj pool class. More...
#include <libpmemobj++/pool.hpp>
Public Member Functions | |
pool () noexcept=default | |
Defaulted constructor. | |
pool (const pool &) noexcept=default | |
Defaulted copy constructor. | |
pool (pool &&) noexcept=default | |
Defaulted move constructor. | |
pool & | operator= (const pool &) noexcept=default |
Defaulted copy assignment operator. | |
pool & | operator= (pool &&) noexcept=default |
Defaulted move assignment operator. | |
~pool () noexcept=default | |
Default destructor. | |
pool (const pool_base &pb) noexcept | |
Defaulted copy constructor. | |
pool (pool_base &&pb) noexcept | |
Defaulted move constructor. | |
template<typename M > | |
M | ctl_get (const std::string &name) |
Query libpmemobj state at pool scope. More... | |
template<typename M > | |
M | ctl_set (const std::string &name, M arg) |
Modify libpmemobj state at pool scope. More... | |
template<typename M > | |
M | ctl_exec (const std::string &name, M arg) |
Execute function at pool scope. More... | |
template<typename M > | |
M | ctl_get (const std::wstring &name) |
Query libpmemobj state at pool scope. More... | |
template<typename M > | |
M | ctl_set (const std::wstring &name, M arg) |
Modify libpmemobj state at pool scope. More... | |
template<typename M > | |
M | ctl_exec (const std::wstring &name, M arg) |
Execute function at pool scope. More... | |
persistent_ptr< T > | root () |
Retrieves pool's root object. More... | |
Static Public Member Functions | |
static pool< T > | open (const std::string &path, const std::string &layout) |
Opens an existing object store memory pool. More... | |
static pool< T > | create (const std::string &path, const std::string &layout, std::size_t size=PMEMOBJ_MIN_POOL, mode_t mode=DEFAULT_MODE) |
Creates a new transactional object store pool. More... | |
static int | check (const std::string &path, const std::string &layout) |
Checks if a given pool is consistent. More... | |
static pool< T > | open (const std::wstring &path, const std::wstring &layout) |
Opens an existing object store memory pool. More... | |
static pool< T > | create (const std::wstring &path, const std::wstring &layout, std::size_t size=PMEMOBJ_MIN_POOL, mode_t mode=DEFAULT_MODE) |
Creates a new transactional object store pool. More... | |
static int | check (const std::wstring &path, const std::wstring &layout) |
Checks if a given pool is consistent. More... | |
PMEMobj pool class.
This class is the pmemobj pool handler. It provides basic primitives for operations on pmemobj pools. The template parameter defines the type of the root object within the pool. The typical usage example would be:
This API should not be mixed with C API. For example explicitly calling pmemobj_set_user_data(pop) on pool which is handled by C++ pool object is undefined behaviour.
|
inlinestatic |
Checks if a given pool is consistent.
path | System path to the file containing the memory pool or a pool set. |
layout | Unique identifier of the pool as specified at pool creation time. |
|
inlinestatic |
Checks if a given pool is consistent.
Wide string variant. Available only on Windows.
path | System path to the file containing the memory pool or a pool set. |
layout | Unique identifier of the pool as specified at pool creation time. |
|
inlinestatic |
Creates a new transactional object store pool.
path | System path to the file to be created. If exists the pool can be created in-place depending on the size parameter. Existing file must be zeroed. |
layout | Unique identifier of the pool, can be a null-terminated string. |
size | Size of the pool in bytes. If zero and the file exists the pool is created in-place. |
mode | File mode for the new file. |
pmem::pool_error | when an error during creation occurs. |
|
inlinestatic |
Creates a new transactional object store pool.
Wide string variant. Available only on Windows.
path | System path to the file to be created. If exists the pool can be created in-place depending on the size parameter. Existing file must be zeroed. |
layout | Unique identifier of the pool, can be a null-terminated string. |
size | Size of the pool in bytes. If zero and the file exists the pool is created in-place. |
mode | File mode for the new file. |
pmem::pool_error | when an error during creation occurs. |
|
inline |
Execute function at pool scope.
[in] | name | name of entry point |
[in] | arg | extra argument |
For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3
|
inline |
Execute function at pool scope.
[in] | name | name of entry point |
[in] | arg | extra argument |
For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3
|
inline |
Query libpmemobj state at pool scope.
[in] | name | name of entry point |
For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3
|
inline |
Query libpmemobj state at pool scope.
[in] | name | name of entry point |
For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3
|
inline |
Modify libpmemobj state at pool scope.
[in] | name | name of entry point |
[in] | arg | extra argument |
For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3
|
inline |
Modify libpmemobj state at pool scope.
[in] | name | name of entry point |
[in] | arg | extra argument |
For more details, see: https://pmem.io/pmdk/manpages/linux/master/libpmemobj/pmemobj_ctl_get.3
|
inlinestatic |
Opens an existing object store memory pool.
path | System path to the file containing the memory pool or a pool set. |
layout | Unique identifier of the pool as specified at pool creation time. |
pmem::pool_error | when an error during opening occurs. |
|
inlinestatic |
Opens an existing object store memory pool.
Wide string variant. Available only on Windows.
path | System path to the file containing the memory pool or a pool set. |
layout | Unique identifier of the pool as specified at pool creation time. |
pmem::pool_error | when an error during opening occurs. |
|
inline |
Retrieves pool's root object.
pmem::pool_error | when pool handle is incorrect. |