Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
migration::cassandra::impl::TransactionsAdapter Class Reference

The adapter for the transactions table. This class is responsible for reading the transactions from the FullTableScanner and converting the blobs to the STTx and TxMeta. More...

#include <TransactionsAdapter.hpp>

Inheritance diagram for migration::cassandra::impl::TransactionsAdapter:
Collaboration diagram for migration::cassandra::impl::TransactionsAdapter:

Public Types

using OnTransactionRead = std::function<void(ripple::STTx, ripple::TxMeta)>
 

Public Member Functions

 TransactionsAdapter (std::shared_ptr< CassandraMigrationBackend > backend, OnTransactionRead onTxRead)
 Construct a new Transactions Adapter object.
 
void onRowRead (TableTransactionsDesc::Row const &row) override
 The callback when a row is read.
 
- Public Member Functions inherited from migration::cassandra::impl::FullTableScannerAdapterBase< TableTransactionsDesc >
 FullTableScannerAdapterBase (std::shared_ptr< CassandraMigrationBackend > backend)
 Construct a new Full Table Scanner Adapter Base object.
 
void readByTokenRange (TokenRange const &range, boost::asio::yield_context yield)
 Read the row in the given token range from database, this is the adapt function for the FullTableScanner.
 
virtual void onRowRead (TableDesc::Row const &row)=0
 Called when a row is read. The derived class should implement this function to convert the database blob to actual data type.
 

Additional Inherited Members

- Protected Attributes inherited from migration::cassandra::impl::FullTableScannerAdapterBase< TableTransactionsDesc >
std::shared_ptr< CassandraMigrationBackendbackend_
 The backend to use.
 

Detailed Description

The adapter for the transactions table. This class is responsible for reading the transactions from the FullTableScanner and converting the blobs to the STTx and TxMeta.

Constructor & Destructor Documentation

◆ TransactionsAdapter()

migration::cassandra::impl::TransactionsAdapter::TransactionsAdapter ( std::shared_ptr< CassandraMigrationBackend > backend,
OnTransactionRead onTxRead )
inlineexplicit

Construct a new Transactions Adapter object.

Parameters
backendThe backend
onTxReadThe callback to call when a transaction is read

Member Function Documentation

◆ onRowRead()

void migration::cassandra::impl::TransactionsAdapter::onRowRead ( TableTransactionsDesc::Row const & row)
override

The callback when a row is read.

Parameters
rowThe row to read

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