OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
parsec/directory/interface.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_INTERFACE_H_
7#define OPENCBDC_TX_SRC_PARSEC_DIRECTORY_INTERFACE_H_
8
10
13 class interface {
14 public:
15 virtual ~interface() = default;
16
17 interface() = default;
18 interface(const interface&) = delete;
19 auto operator=(const interface&) -> interface& = delete;
20 interface(interface&&) = delete;
21 auto operator=(interface&&) -> interface& = delete;
22
24 using key_location_return_type = uint64_t;
27 = std::function<void(key_location_return_type)>;
28
34 key_location_callback_type result_callback)
35 -> bool
36 = 0;
37 };
38}
39
40#endif
Buffer to store and retrieve byte data.
Definition buffer.hpp:15
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.
auto operator=(interface &&) -> interface &=delete
interface(interface &&)=delete
auto operator=(const interface &) -> interface &=delete
virtual auto key_location(runtime_locking_shard::key_type key, key_location_callback_type result_callback) -> bool=0
Returns the shard ID responsible for the given key.
uint64_t key_location_return_type
Key location return type. Shard ID where key is located.
interface(const interface &)=delete