OpenCBDC Transaction Processor
Loading...
Searching...
No Matches
cbdc::raft::index_comparator Class Reference

LevelDB comparator for ordering NuRaft log indices. More...

#include <index_comparator.hpp>

Inheritance diagram for cbdc::raft::index_comparator:
Collaboration diagram for cbdc::raft::index_comparator:

Public Member Functions

auto Compare (const leveldb::Slice &a, const leveldb::Slice &b) const -> int override
 Compare the order of the two given LevelDB keys when converted to uint64_t.
 
auto Name () const -> const char *override
 Return the comparator name.
 
void FindShortestSeparator (std::string *, const leveldb::Slice &) const override
 Not implemented.
 
void FindShortSuccessor (std::string *) const override
 Not implemented.
 

Detailed Description

LevelDB comparator for ordering NuRaft log indices.

Definition at line 13 of file index_comparator.hpp.

Member Function Documentation

◆ Compare()

auto cbdc::raft::index_comparator::Compare ( const leveldb::Slice & a,
const leveldb::Slice & b ) const -> int
nodiscardoverride

Compare the order of the two given LevelDB keys when converted to uint64_t.

Parameters
afirst key.
bsecond key.
Returns
0 if a == b. -1 if a < b. 1 if a > b.

Definition at line 13 of file index_comparator.cpp.

◆ FindShortestSeparator()

void cbdc::raft::index_comparator::FindShortestSeparator ( std::string * ,
const leveldb::Slice &  ) const
override

Not implemented.

Definition at line 35 of file index_comparator.cpp.

◆ FindShortSuccessor()

void cbdc::raft::index_comparator::FindShortSuccessor ( std::string * ) const
override

Not implemented.

Definition at line 39 of file index_comparator.cpp.

◆ Name()

auto cbdc::raft::index_comparator::Name ( ) const -> const char*
nodiscardoverride

Return the comparator name.

Returns
"IndexComparator".

Definition at line 31 of file index_comparator.cpp.


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