|
OpenCBDC Transaction Processor
|
Implementation of a directory which map keys to shard IDs. Thread-safe. More...
#include <impl.hpp>


Public Member Functions | |
| impl (size_t n_shards) | |
| Constructor. | |
| auto | key_location (runtime_locking_shard::key_type key, key_location_callback_type result_callback) -> bool override |
| Returns the shard ID responsible for the given key. | |
Public Member Functions inherited from cbdc::parsec::directory::interface | |
| virtual | ~interface ()=default |
| interface ()=default | |
| interface (const interface &)=delete | |
| auto | operator= (const interface &) -> interface &=delete |
| interface (interface &&)=delete | |
| auto | operator= (interface &&) -> interface &=delete |
Additional Inherited Members | |
Public Types inherited from cbdc::parsec::directory::interface | |
| using | key_location_return_type = uint64_t |
| Key location return type. Shard ID where key is located. | |
| using | key_location_callback_type = std::function<void(key_location_return_type)> |
| Callback function type for key location result. | |
Implementation of a directory which map keys to shard IDs. Thread-safe.
Definition at line 13 of file directory/impl.hpp.
|
explicit |
Constructor.
| n_shards | number of shards available to the directory. |
Definition at line 9 of file directory/impl.cpp.
|
overridevirtual |
Returns the shard ID responsible for the given key.
Calls the callback before returning.
| key | key to locate. |
| result_callback | function to call with key location. |
Implements cbdc::parsec::directory::interface.
Definition at line 11 of file directory/impl.cpp.