CCF
Loading...
Searching...
No Matches
Namespaces | Typedefs | Enumerations | Functions
historical_queries_adapter.h File Reference
#include "ccf/ccf_deprecated.h"
#include "ccf/endpoint_context.h"
#include "ccf/historical_queries_interface.h"
#include "ccf/node_context.h"
#include "ccf/tx_id.h"
#include "ccf/tx_status.h"

Go to the source code of this file.

Namespaces

namespace  ccf
 
namespace  ccf::kv
 
namespace  ccf::historical
 

Typedefs

using ccf::historical::CheckAvailability = std::function< bool(ccf::View view, ccf::SeqNo seqno, std::string &error_reason)>
 
using ccf::historical::HandleReadWriteHistoricalQuery = std::function< void(ccf::endpoints::EndpointContext &args, StatePtr state)>
 
using ccf::historical::HandleReadOnlyHistoricalQuery = std::function< void(ccf::endpoints::ReadOnlyEndpointContext &args, StatePtr state)>
 
using ccf::historical::HandleHistoricalQuery = HandleReadWriteHistoricalQuery
 
using ccf::historical::CommandTxIDExtractor = std::function< std::optional< ccf::TxID >(endpoints::CommandEndpointContext &args)>
 
using ccf::historical::ReadOnlyTxIDExtractor = std::function< std::optional< ccf::TxID >(endpoints::ReadOnlyEndpointContext &args)>
 
using ccf::historical::TxIDExtractor = std::function< std::optional< ccf::TxID >(endpoints::EndpointContext &args)>
 
using ccf::historical::ErrorHandler = std::function< void(HistoricalQueryErrorCode err, std::string reason, endpoints::EndpointContext &args)>
 
using ccf::historical::ReadOnlyErrorHandler = std::function< void(HistoricalQueryErrorCode err, std::string reason, endpoints::ReadOnlyEndpointContext &args)>
 
using ccf::historical::CheckHistoricalTxStatus = std::function< HistoricalTxStatus(ccf::View view, ccf::SeqNo seqno, std::string &error_reason)>
 

Enumerations

enum class  ccf::historical::HistoricalQueryErrorCode {
  ccf::historical::InternalError , ccf::historical::TransactionPending , ccf::historical::TransactionInvalid , ccf::historical::TransactionIdMissing ,
  ccf::historical::TransactionPartiallyReady
}
 
enum class  ccf::historical::HistoricalTxStatus { ccf::historical::Error , ccf::historical::PendingOrUnknown , ccf::historical::Invalid , ccf::historical::Valid }
 

Functions

std::optional< ccf::TxIDccf::historical::txid_from_header (endpoints::CommandEndpointContext &args)
 
void ccf::historical::default_error_handler (HistoricalQueryErrorCode err, std::string reason, endpoints::CommandEndpointContext &args)
 
HistoricalTxStatus ccf::historical::is_tx_committed_v2 (ccf::kv::Consensus *consensus, ccf::View view, ccf::SeqNo seqno, std::string &error_reason)
 
ccf::endpoints::EndpointFunction ccf::historical::adapter_v3 (const HandleHistoricalQuery &f, ccf::AbstractNodeContext &node_context, const CheckHistoricalTxStatus &available, const TxIDExtractor &extractor=txid_from_header)
 
ccf::endpoints::ReadOnlyEndpointFunction ccf::historical::read_only_adapter_v3 (const HandleReadOnlyHistoricalQuery &f, ccf::AbstractNodeContext &node_context, const CheckHistoricalTxStatus &available, const ReadOnlyTxIDExtractor &extractor=txid_from_header)
 
ccf::endpoints::EndpointFunction ccf::historical::read_write_adapter_v3 (const HandleReadWriteHistoricalQuery &f, ccf::AbstractNodeContext &node_context, const CheckHistoricalTxStatus &available, const TxIDExtractor &extractor=txid_from_header)
 
ccf::endpoints::ReadOnlyEndpointFunction ccf::historical::read_only_adapter_v4 (const HandleReadOnlyHistoricalQuery &f, ccf::AbstractNodeContext &node_context, const CheckHistoricalTxStatus &available, const ReadOnlyTxIDExtractor &extractor=txid_from_header, const ReadOnlyErrorHandler &ehandler=default_error_handler)
 
ccf::endpoints::EndpointFunction ccf::historical::read_write_adapter_v4 (const HandleReadWriteHistoricalQuery &f, ccf::AbstractNodeContext &node_context, const CheckHistoricalTxStatus &available, const TxIDExtractor &extractor=txid_from_header, const ErrorHandler &ehandler=default_error_handler)