A generalized Metall manager class. More...
#include </home/runner/work/metall/metall/include/metall/basic_manager.hpp>
Public Types | |
using | manager_kernel_type = kernel::manager_kernel< storage, segment_storage, chunk_no_type, k_chunk_size > |
Manager kernel type. More... | |
using | void_pointer = typename manager_kernel_type::void_pointer |
Void pointer type. More... | |
using | char_type = typename manager_kernel_type::char_type |
Char type. More... | |
using | size_type = typename manager_kernel_type::size_type |
Size type. More... | |
using | difference_type = typename manager_kernel_type::difference_type |
Difference type. More... | |
template<typename T > | |
using | allocator_type = stl_allocator< T, manager_kernel_type > |
Allocator type. More... | |
template<typename OuterT , typename... InnerT> | |
using | scoped_allocator_type = container::scoped_allocator_adaptor< allocator_type< OuterT >, allocator_type< InnerT >... > |
Allocator type wrapped by scoped_allocator_adaptor. More... | |
template<typename T > | |
using | fallback_allocator = container::fallback_allocator_adaptor< allocator_type< T > > |
A STL compatible allocator which fallbacks to a heap allocator (e.g., malloc()) if no argument is provided to construct a allocator_type instance. More... | |
template<typename T > | |
using | scoped_fallback_allocator_type = container::scoped_allocator_adaptor< fallback_allocator< T > > |
Fallback allocator type wrapped by scoped_allocator_adaptor. More... | |
template<typename T > | |
using | construct_proxy = metall::mtlldetail::named_proxy< manager_kernel_type, T, false > |
Construct proxy. More... | |
template<typename T > | |
using | construct_iter_proxy = metall::mtlldetail::named_proxy< manager_kernel_type, T, true > |
Construct iterator proxy. More... | |
using | instance_kind = typename manager_kernel_type::instance_kind |
An value that describes the type of the instance constructed in memory. More... | |
using | const_named_iterator = typename manager_kernel_type::const_named_iterator |
Const iterator for named objects. More... | |
using | const_unique_iterator = typename manager_kernel_type::const_unique_iterator |
Const iterator for unique objects. More... | |
using | const_anonymous_iterator = typename manager_kernel_type::const_anonymous_iterator |
Const iterator for anonymous objects. More... | |
using | named_object_attribute_accessor_type = typename manager_kernel_type::named_object_attr_accessor_type |
Provides access to named object attribute. More... | |
using | unique_object_attribute_accessor_type = typename manager_kernel_type::unique_object_attr_accessor_type |
Provides access to unique object attribute. More... | |
using | anonymous_object_attribute_accessor_type = typename manager_kernel_type::anonymous_object_attr_accessor_type |
Provides access to anonymous object attribute. More... | |
using | chunk_number_type = chunk_no_type |
Chunk number type (= chunk_no_type) More... | |
using | path_type = typename manager_kernel_type::path_type |
Path type. More... | |
Public Member Functions | |
basic_manager (open_only_t, const path_type &base_path) noexcept | |
Opens an existing data store. More... | |
basic_manager (open_read_only_t, const path_type &base_path) noexcept | |
Opens an existing data store with the read only mode. Write accesses will cause segmentation fault. More... | |
basic_manager (create_only_t, const path_type &base_path) noexcept | |
Creates a new data store (an existing data store will be overwritten). More... | |
basic_manager (create_only_t, const path_type &base_path, const size_type capacity) noexcept | |
Creates a new data store (an existing data store will be overwritten). More... | |
basic_manager ()=delete | |
Deleted. More... | |
~basic_manager () noexcept=default | |
Destructor. More... | |
basic_manager (const basic_manager &)=delete | |
Deleted. More... | |
basic_manager (basic_manager &&) noexcept=default | |
Move constructor. More... | |
basic_manager & | operator= (const basic_manager &)=delete |
Deleted. More... | |
basic_manager & | operator= (basic_manager &&) noexcept=default |
Move assignment operator. More... | |
template<typename T > | |
construct_proxy< T > | construct (char_ptr_holder_type name) |
Allocates an object of type T. More... | |
template<typename T > | |
construct_proxy< T > | find_or_construct (char_ptr_holder_type name) |
Tries to find an already constructed object. If not exist, constructs an object of type T. More... | |
template<typename T > | |
construct_iter_proxy< T > | construct_it (char_ptr_holder_type name) |
Allocates an array of objects of type T, receiving arguments from iterators. More... | |
template<typename T > | |
construct_iter_proxy< T > | find_or_construct_it (char_ptr_holder_type name) |
Tries to find an already constructed object. If not exist, constructs an array of objects of type T, receiving arguments from iterators. More... | |
template<typename T > | |
std::pair< T *, size_type > | find (char_ptr_holder_type name) const noexcept |
Tries to find a previously created object. More... | |
template<typename T > | |
bool | destroy (const char *name) |
Destroys a previously created object. Calls the destructor and frees the memory. More... | |
template<typename T > | |
bool | destroy (const metall::mtlldetail::unique_instance_t *const) |
Destroys a unique object of type T. Calls the destructor and frees the memory. More... | |
template<class T > | |
bool | destroy_ptr (const T *ptr) |
Destroys a object (named, unique, or anonymous) by its address. Calls the destructor and frees the memory. Cannot destroy an object not allocated by construct/find_or_construct functions. More... | |
template<class T > | |
const char_type * | get_instance_name (const T *ptr) const noexcept |
Returns the name of an object created with construct/find_or_construct functions. More... | |
template<class T > | |
instance_kind | get_instance_kind (const T *ptr) const noexcept |
Returns the kind of an object created with construct/find_or_construct functions. More... | |
template<class T > | |
size_type | get_instance_length (const T *ptr) const noexcept |
Returns the length of an object created with construct/find_or_construct functions (1 if is a single element, >=1 if it's an array). More... | |
template<class T > | |
bool | is_instance_type (const void *const ptr) const noexcept |
Checks if the type of an object, which was created with construct/find_or_construct functions, is T. More... | |
template<class T > | |
bool | get_instance_description (const T *ptr, std::string *description) const noexcept |
Gets the description of an object created with construct/find_or_construct. More... | |
template<class T > | |
bool | set_instance_description (const T *ptr, const std::string &description) noexcept |
Sets a description to an object created with construct/find_or_construct. More... | |
size_type | get_num_named_objects () const noexcept |
Returns Returns the number of named objects stored in the managed segment. More... | |
size_type | get_num_unique_objects () const noexcept |
Returns Returns the number of unique objects stored in the managed segment. More... | |
size_type | get_num_anonymous_objects () const noexcept |
Returns Returns the number of anonymous objects (objects constructed with metall::anonymous_instance) stored in the managed segment. More... | |
const_named_iterator | named_begin () const noexcept |
Returns a constant iterator to the index storing the named objects. More... | |
const_named_iterator | named_end () const noexcept |
Returns a constant iterator to the end of the index storing the named allocations. More... | |
const_unique_iterator | unique_begin () const noexcept |
Returns a constant iterator to the index storing the unique objects. More... | |
const_unique_iterator | unique_end () const noexcept |
Returns a constant iterator to the end of the index storing the unique allocations. More... | |
const_anonymous_iterator | anonymous_begin () const noexcept |
Returns a constant iterator to the index storing the anonymous objects. More... | |
const_anonymous_iterator | anonymous_end () const noexcept |
Returns a constant iterator to the end of the index storing the anonymous allocations. More... | |
void * | allocate (size_type nbytes) noexcept |
Allocates nbytes bytes. More... | |
void * | allocate_aligned (size_type nbytes, size_type alignment) noexcept |
Allocates nbytes bytes. The address of the allocated memory will be a multiple of alignment. More... | |
void | deallocate (void *addr) noexcept |
Deallocates the allocated memory. More... | |
bool | all_memory_deallocated () const noexcept |
Check if all allocated memory has been deallocated. More... | |
void | flush (const bool synchronous=true) noexcept |
Flush data to persistent memory. More... | |
bool | snapshot (const path_type &destination_path, const bool clone=true, const int num_max_copy_threads=0) noexcept |
Takes a snapshot of the current data. The snapshot has a new UUID. More... | |
std::string | get_uuid () const noexcept |
Returns a UUID of the data store. More... | |
version_type | get_version () const noexcept |
Gets the version of the Metall that created the backing data store. More... | |
bool | set_description (const std::string &description) noexcept |
Sets a description to a Metall data store. An existing description is overwritten (only one description per data store). More... | |
bool | get_description (std::string *description) const noexcept |
Gets a description. If there is no description, nothing to happen to the given description object. More... | |
template<typename T = std::byte> | |
allocator_type< T > | get_allocator () const noexcept |
Returns a STL compatible allocator object. More... | |
const void * | get_address () const noexcept |
Returns the address of the application data segment. More... | |
size_type | get_size () const noexcept |
Returns the size (i.e., the maximum total allocation size) of the application data segment. This is a theoretical value. The actual total allocation size Metall can handle will be less than that. More... | |
bool | read_only () const noexcept |
Returns if this manager was opened as read-only. More... | |
bool | check_sanity () const noexcept |
Checks the sanity. More... | |
Static Public Member Functions | |
static bool | copy (const path_type &source_path, const path_type &destination_path, const bool clone=true, const int num_max_copy_threads=0) noexcept |
Copies data store synchronously. The behavior of copying a data store that is open without the read-only mode is undefined. More... | |
static auto | copy_async (const path_type source_path, const path_type destination_path, const bool clone=true, const int num_max_copy_threads=0) noexcept |
Copies data store asynchronously. The behavior of copying a data store that is open without the read-only mode is undefined. More... | |
static bool | remove (const path_type &path) noexcept |
Removes data store synchronously. More... | |
static std::future< bool > | remove_async (const path_type &path) noexcept |
Remove data store asynchronously. More... | |
static bool | consistent (const path_type &path) noexcept |
Check if a data store exists and is consistent (i.e., it was closed properly in the previous run). More... | |
static std::string | get_uuid (const path_type &path) noexcept |
Returns a UUID of the data store. More... | |
static version_type | get_version (const path_type &path) noexcept |
Gets the version of the Metall that created the backing data store. More... | |
static bool | set_description (const path_type &path, const std::string &description) noexcept |
Sets a description to a Metall data store. An existing description is overwritten (only one description per data store). More... | |
static bool | get_description (const path_type &path, std::string *description) noexcept |
Gets a description. If there is no description, nothing to happen to the given description object. More... | |
static named_object_attribute_accessor_type | access_named_object_attribute (const path_type &path) noexcept |
Returns an instance that provides access to the attribute of named objects. More... | |
static unique_object_attribute_accessor_type | access_unique_object_attribute (const path_type &path) noexcept |
Returns an instance that provides access to the attribute of unique object. More... | |
static anonymous_object_attribute_accessor_type | access_anonymous_object_attribute (const path_type &path) noexcept |
Returns an instance that provides access to the attribute of anonymous object. More... | |
static constexpr size_type | chunk_size () noexcept |
Returns the internal chunk size. More... | |
A generalized Metall manager class.
storage | Storage manager. |
segment_storage | Segment storage manager. |
chunk_no_type | Type of chunk number. |
k_chunk_size | Size of single chunk in byte. |
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::manager_kernel_type = kernel::manager_kernel<storage, segment_storage, chunk_no_type, k_chunk_size> |
Manager kernel type.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::void_pointer = typename manager_kernel_type::void_pointer |
Void pointer type.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::char_type = typename manager_kernel_type::char_type |
Char type.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::size_type = typename manager_kernel_type::size_type |
Size type.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::difference_type = typename manager_kernel_type::difference_type |
Difference type.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::allocator_type = stl_allocator<T, manager_kernel_type> |
Allocator type.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::scoped_allocator_type = container::scoped_allocator_adaptor<allocator_type<OuterT>, allocator_type<InnerT>...> |
Allocator type wrapped by scoped_allocator_adaptor.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::fallback_allocator = container::fallback_allocator_adaptor<allocator_type<T> > |
A STL compatible allocator which fallbacks to a heap allocator (e.g., malloc()) if no argument is provided to construct a allocator_type instance.
T | The type of the object to allocate |
This allocator enables the following code.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::scoped_fallback_allocator_type = container::scoped_allocator_adaptor<fallback_allocator<T> > |
Fallback allocator type wrapped by scoped_allocator_adaptor.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::construct_proxy = metall::mtlldetail::named_proxy<manager_kernel_type, T, false> |
Construct proxy.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::construct_iter_proxy = metall::mtlldetail::named_proxy<manager_kernel_type, T, true> |
Construct iterator proxy.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::instance_kind = typename manager_kernel_type::instance_kind |
An value that describes the type of the instance constructed in memory.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::const_named_iterator = typename manager_kernel_type::const_named_iterator |
Const iterator for named objects.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::const_unique_iterator = typename manager_kernel_type::const_unique_iterator |
Const iterator for unique objects.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::const_anonymous_iterator = typename manager_kernel_type::const_anonymous_iterator |
Const iterator for anonymous objects.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::named_object_attribute_accessor_type = typename manager_kernel_type::named_object_attr_accessor_type |
Provides access to named object attribute.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::unique_object_attribute_accessor_type = typename manager_kernel_type::unique_object_attr_accessor_type |
Provides access to unique object attribute.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::anonymous_object_attribute_accessor_type = typename manager_kernel_type::anonymous_object_attr_accessor_type |
Provides access to anonymous object attribute.
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::chunk_number_type = chunk_no_type |
Chunk number type (= chunk_no_type)
using metall::basic_manager< storage, segment_storage, chunk_no_type, k_chunk_size >::path_type = typename manager_kernel_type::path_type |
Path type.
|
inlinenoexcept |
Opens an existing data store.
base_path | Path to a data store. |
|
inlinenoexcept |
Opens an existing data store with the read only mode. Write accesses will cause segmentation fault.
base_path | Path to a data store. |
|
inlinenoexcept |
Creates a new data store (an existing data store will be overwritten).
base_path | Path to create a data store. |
|
inlinenoexcept |
Creates a new data store (an existing data store will be overwritten).
base_path | Path to create a data store. |
capacity | Total allocation size. Metall uses this value as a hint. |
|
delete |
Deleted.
|
defaultnoexcept |
Destructor.
|
delete |
Deleted.
|
defaultnoexcept |
Move constructor.
|
delete |
Deleted.
|
defaultnoexcept |
Move assignment operator.
|
inline |
Allocates an object of type T.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
If T's constructor throws, the function throws that exception. Memory is freed automatically if T's constructor throws and if an array was being constructed, destructors of created objects are called before freeing the memory.
Example:
Where, 'arg1, arg2...' are the arguments passed to T's constructor via a proxy object. One can also construct an array using '[ ]' operator. When an array is constructed, each object receives the same arguments.
T | The type of the object. |
name | A unique name of the object. |
|
inline |
Tries to find an already constructed object. If not exist, constructs an object of type T.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
If T's constructor throws, the function throws that exception. Memory is freed automatically if T's constructor throws and if an array was being constructed, destructors of created objects are called before freeing the memory.
Example:
Where, 'arg1, arg2...' are the arguments passed to T's constructor via a proxy object. One can also construct an array using '[ ]' operator. When an array is constructed, each object receives the same arguments.
T | The type of the object. |
name | The name of the object. |
|
inline |
Allocates an array of objects of type T, receiving arguments from iterators.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
If T's constructor throws, the function throws that exception. Memory is freed automatically if T's constructor throws and if an array was being constructed, destructors of created objects are called before freeing the memory.
Example:
Each object receives parameters returned with the expression (*it1++, *it2++,... ).
T | The type of the object. |
name | A unique name of the object. |
|
inline |
Tries to find an already constructed object. If not exist, constructs an array of objects of type T, receiving arguments from iterators.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
If T's constructor throws, the function throws that exception. Memory is freed automatically if T's constructor throws and if an array was being constructed, destructors of created objects are called before freeing the memory.
Example:
Each object receives parameters returned with the expression (*it1++, *it2++,... ).
T | The type of the object. |
name | A unique name of the object. |
|
inlinenoexcept |
Tries to find a previously created object.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
Example:
T | The type of the object. |
name | The name of the object. |
|
inline |
Destroys a previously created object. Calls the destructor and frees the memory.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
Example:
T | The type of the object. |
name | The name of the object. |
|
inline |
Destroys a unique object of type T. Calls the destructor and frees the memory.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
Example:
T | The type of the object. |
|
inline |
Destroys a object (named, unique, or anonymous) by its address. Calls the destructor and frees the memory. Cannot destroy an object not allocated by construct/find_or_construct functions.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
Example:
T | The type of the object. |
ptr | A pointer to the object. |
|
inlinenoexcept |
Returns the name of an object created with construct/find_or_construct functions.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
Example:
T | The type of the object. |
ptr | A pointer to the object. |
|
inlinenoexcept |
Returns the kind of an object created with construct/find_or_construct functions.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
Example:
T | The type of the object. |
ptr | A pointer to the object. |
|
inlinenoexcept |
Returns the length of an object created with construct/find_or_construct functions (1 if is a single element, >=1 if it's an array).
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
Example:
T | The type of the object. |
ptr | A pointer to the object. |
|
inlinenoexcept |
Checks if the type of an object, which was created with construct/find_or_construct functions, is T.
Example:
T | A expected type of the object. |
ptr | A pointer to the object. |
|
inlinenoexcept |
Gets the description of an object created with construct/find_or_construct.
Example:
T | The type of the object. |
ptr | A pointer to the object. |
description | A pointer to a string buffer. |
|
inlinenoexcept |
Sets a description to an object created with construct/find_or_construct.
Example:
T | The type of the object. |
ptr | A pointer to the object. |
description | A description to set. |
|
inlinenoexcept |
Returns Returns the number of named objects stored in the managed segment.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
|
inlinenoexcept |
Returns Returns the number of unique objects stored in the managed segment.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
|
inlinenoexcept |
Returns Returns the number of anonymous objects (objects constructed with metall::anonymous_instance) stored in the managed segment.
|
inlinenoexcept |
Returns a constant iterator to the index storing the named objects.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
|
inlinenoexcept |
Returns a constant iterator to the end of the index storing the named allocations.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
|
inlinenoexcept |
Returns a constant iterator to the index storing the unique objects.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
|
inlinenoexcept |
Returns a constant iterator to the end of the index storing the unique allocations.
Attributed object construction family API developed by Boost.Interprocess (see details).
A named object must be associated with non-empty name. The name of an unique object is typeid(T).name(). An anonymous object has no name.
|
inlinenoexcept |
Returns a constant iterator to the index storing the anonymous objects.
|
inlinenoexcept |
Returns a constant iterator to the end of the index storing the anonymous allocations.
|
inlinenoexcept |
Allocates nbytes bytes.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
nbytes | Number of bytes to allocate. |
|
inlinenoexcept |
Allocates nbytes bytes. The address of the allocated memory will be a multiple of alignment.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
nbytes | Number of bytes to allocate. Must be a multiple alignment. |
alignment | Alignment size. Alignment must be a power of two and satisfy [min allocation size, system page size]. |
|
inlinenoexcept |
Deallocates the allocated memory.
This function is thread-safe. Other threads can also call the attributed object construction functions and allocate functions simultaneously.
addr | A pointer to the allocated memory to be deallocated. |
|
inlinenoexcept |
Check if all allocated memory has been deallocated.
This function is not cheap if many objects has not been deallocated.
|
inlinenoexcept |
Flush data to persistent memory.
synchronous | If true, performs synchronous operation; otherwise, performs asynchronous operation. |
|
inlinenoexcept |
Takes a snapshot of the current data. The snapshot has a new UUID.
destination_path | Path to store a snapshot. |
clone | Use the file clone mechanism (reflink) instead of normal copy if it is available. |
num_max_copy_threads | The maximum number of copy threads to use. If <= 0 is given, the value is automatically determined. |
|
inlinestaticnoexcept |
Copies data store synchronously. The behavior of copying a data store that is open without the read-only mode is undefined.
This function is thread-safe.
Copying to the same path simultaneously is prohibited.
source_path | Source data store path. |
destination_path | Destination data store path. |
clone | Use the file clone mechanism (reflink) instead of normal copy if it is available. |
num_max_copy_threads | The maximum number of copy threads to use. If <= 0 is given, the value is automatically determined. |
|
inlinestaticnoexcept |
Copies data store asynchronously. The behavior of copying a data store that is open without the read-only mode is undefined.
This function is thread-safe.
Copying to the same path simultaneously is prohibited.
source_path | Source data store path. |
destination_path | Destination data store path. |
clone | Use the file clone mechanism (reflink) instead of normal copy if it is available. |
num_max_copy_threads | The maximum number of copy threads to use. If <= 0 is given, the value is automatically determined. |
|
inlinestaticnoexcept |
Removes data store synchronously.
This function is thread-safe.
Must not remove the same data store simultaneously.
path | Path to a data store to remove. |
|
inlinestaticnoexcept |
Remove data store asynchronously.
This function is thread-safe.
Must not remove the same data store simultaneously.
path | Path to the data store to remove. |
|
inlinestaticnoexcept |
Check if a data store exists and is consistent (i.e., it was closed properly in the previous run).
This function is thread-safe.
Calling this function against a data store that is open without the read-only mode is undefined. If the data store is not consistent, it is recommended to remove the data store and create a new one.
path | Path to a data store. |
|
inlinenoexcept |
Returns a UUID of the data store.
This function is thread-safe.
|
inlinestaticnoexcept |
Returns a UUID of the data store.
This function is thread-safe.
path | Path to a data store. |
|
inlinenoexcept |
Gets the version of the Metall that created the backing data store.
This function is thread-safe.
|
inlinestaticnoexcept |
Gets the version of the Metall that created the backing data store.
This function is thread-safe.
path | Path to a data store. |
|
inlinenoexcept |
Sets a description to a Metall data store. An existing description is overwritten (only one description per data store).
description | An std::string object that holds a description. |
|
inlinestaticnoexcept |
Sets a description to a Metall data store. An existing description is overwritten (only one description per data store).
path | Path to a data store. |
description | An std::string object that holds a description. |
|
inlinenoexcept |
Gets a description. If there is no description, nothing to happen to the given description object.
description | A pointer to an std::string object to store a description if it exists. |
|
inlinestaticnoexcept |
Gets a description. If there is no description, nothing to happen to the given description object.
path | Path to a data store. |
description | A pointer to an std::string object to store a description if it exists. |
|
inlinestaticnoexcept |
Returns an instance that provides access to the attribute of named objects.
path | Path to a data store. |
|
inlinestaticnoexcept |
Returns an instance that provides access to the attribute of unique object.
path | Path to a data store. |
|
inlinestaticnoexcept |
Returns an instance that provides access to the attribute of anonymous object.
path | Path to a data store. |
|
inlinenoexcept |
Returns a STL compatible allocator object.
This function is thread-safe.
T | Type of the object. |
|
inlinestaticconstexprnoexcept |
Returns the internal chunk size.
This function is thread-safe.
|
inlinenoexcept |
Returns the address of the application data segment.
This function is thread-safe.
|
inlinenoexcept |
Returns the size (i.e., the maximum total allocation size) of the application data segment. This is a theoretical value. The actual total allocation size Metall can handle will be less than that.
This function is thread-safe.
|
inlinenoexcept |
Returns if this manager was opened as read-only.
This function is thread-safe.
|
inlinenoexcept |
Checks the sanity.
This function is thread-safe.