OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
directory/impl.hpp
Go to the documentation of this file.
1// Copyright (c) 2021 MIT Digital Currency Initiative,
2// Federal Reserve Bank of Boston
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#ifndef OPENCBDC_TX_SRC_PARSEC_DIRECTORY_IMPL_H_
7#define OPENCBDC_TX_SRC_PARSEC_DIRECTORY_IMPL_H_
8
9#include "interface.hpp"
10
13 class impl : public interface {
14 public:
17 explicit impl(size_t n_shards);
18
25 key_location_callback_type result_callback)
26 -> bool override;
27
28 private:
29 size_t m_n_shards{};
31 };
32}
33
34#endif
Buffer to store and retrieve byte data.
Definition buffer.hpp:15
Implementation of a directory which map keys to shard IDs. Thread-safe.
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.
impl(size_t n_shards)
Constructor.
Interface for a directory. Maps keys to shard IDs.
std::function< void(key_location_return_type)> key_location_callback_type
Callback function type for key location result.
SipHash function to generate STL data structure hash keys for system IDs.
Definition hashmap.hpp:27