OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::parsec::directory::interface Class Referenceabstract

Interface for a directory. Maps keys to shard IDs. More...

#include <interface.hpp>

Inheritance diagram for cbdc::parsec::directory::interface:

Public Types

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.
 

Public Member Functions

virtual ~interface ()=default
 
 interface ()=default
 
 interface (const interface &)=delete
 
auto operator= (const interface &) -> interface &=delete
 
 interface (interface &&)=delete
 
auto operator= (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.
 

Detailed Description

Interface for a directory. Maps keys to shard IDs.

Definition at line 13 of file parsec/directory/interface.hpp.

Member Typedef Documentation

◆ key_location_callback_type

Callback function type for key location result.

Definition at line 26 of file parsec/directory/interface.hpp.

◆ key_location_return_type

Key location return type. Shard ID where key is located.

Definition at line 24 of file parsec/directory/interface.hpp.

Constructor & Destructor Documentation

◆ ~interface()

virtual cbdc::parsec::directory::interface::~interface ( )
virtualdefault

◆ interface() [1/3]

cbdc::parsec::directory::interface::interface ( )
default

◆ interface() [2/3]

cbdc::parsec::directory::interface::interface ( const interface & )
delete

◆ interface() [3/3]

cbdc::parsec::directory::interface::interface ( interface && )
delete

Member Function Documentation

◆ key_location()

virtual auto cbdc::parsec::directory::interface::key_location ( runtime_locking_shard::key_type key,
key_location_callback_type result_callback ) -> bool
pure virtual

Returns the shard ID responsible for the given key.

Parameters
keykey to locate.
result_callbackfunction to call with key location.
Returns
true if the operation was initiated successfully.

Implemented in cbdc::parsec::directory::impl.

◆ operator=() [1/2]

auto cbdc::parsec::directory::interface::operator= ( const interface & ) -> interface &=delete
delete

◆ operator=() [2/2]

auto cbdc::parsec::directory::interface::operator= ( interface && ) -> interface &=delete
delete

The documentation for this class was generated from the following file: