|
rippled
|


Public Types | |
| using | AccountTx = std::pair< std::shared_ptr< Transaction >, std::shared_ptr< TxMeta > > |
| using | AccountTxs = std::vector< AccountTx > |
| using | txnMetaLedgerType = std::tuple< Blob, Blob, std::uint32_t > |
| using | MetaTxsList = std::vector< txnMetaLedgerType > |
| using | LedgerSequence = uint32_t |
| using | LedgerHash = uint256 |
| using | LedgerShortcut = RPC::LedgerShortcut |
| using | LedgerSpecifier = std::variant< LedgerRange, LedgerShortcut, LedgerSequence, LedgerHash > |
Public Member Functions | |
| virtual void | stop ()=0 |
| There is only one implementation of this interface: RelationalDBInterfacePostgresImp. More... | |
| virtual void | sweep ()=0 |
| sweep Sweep the database. More... | |
| virtual std::string | getCompleteLedgers ()=0 |
| getCompleteLedgers Returns string which contains list of completed ledgers. More... | |
| virtual std::chrono::seconds | getValidatedLedgerAge ()=0 |
| getValidatedLedgerAge Returns age of last validated ledger. More... | |
| virtual bool | writeLedgerAndTransactions (LedgerInfo const &info, std::vector< AccountTransactionsData > const &accountTxData)=0 |
| writeLedgerAndTransactions Write new ledger and transaction data into database. More... | |
| virtual std::vector< uint256 > | getTxHashes (LedgerIndex seq)=0 |
| getTxHashes Returns vector of tx hashes by given ledger sequence. More... | |
| virtual std::pair< AccountTxResult, RPC::Status > | getAccountTx (AccountTxArgs const &args)=0 |
| getAccountTx Get last account transactions specifies by passed argumenrs structure. More... | |
| virtual Transaction::Locator | locateTransaction (uint256 const &id)=0 |
| locateTransaction Returns information used to locate a transaction. More... | |
| virtual bool | isCaughtUp (std::string &reason)=0 |
| isCaughtUp returns whether the database is caught up with the network More... | |
| virtual std::optional< LedgerIndex > | getMinLedgerSeq ()=0 |
| getMinLedgerSeq Returns minimum ledger sequence in Ledgers table. More... | |
| virtual std::optional< LedgerIndex > | getMaxLedgerSeq ()=0 |
| getMaxLedgerSeq Returns maximum ledger sequence in Ledgers table. More... | |
| virtual std::optional< LedgerInfo > | getLedgerInfoByIndex (LedgerIndex ledgerSeq)=0 |
| getLedgerInfoByIndex Returns ledger by its sequence. More... | |
| virtual std::optional< LedgerInfo > | getNewestLedgerInfo ()=0 |
| getNewestLedgerInfo Returns info of newest saved ledger. More... | |
| virtual std::optional< LedgerInfo > | getLedgerInfoByHash (uint256 const &ledgerHash)=0 |
| getLedgerInfoByHash Returns info of ledger with given hash. More... | |
| virtual uint256 | getHashByIndex (LedgerIndex ledgerIndex)=0 |
| getHashByIndex Returns hash of ledger with given sequence. More... | |
| virtual std::optional< LedgerHashPair > | getHashesByIndex (LedgerIndex ledgerIndex)=0 |
| getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequence. More... | |
| virtual std::map< LedgerIndex, LedgerHashPair > | getHashesByIndex (LedgerIndex minSeq, LedgerIndex maxSeq)=0 |
| getHashesByIndex Returns hash of the ledger and hash of parent ledger for all ledgers with sequences from given minimum limit to given maximum limit. More... | |
| virtual std::vector< std::shared_ptr< Transaction > > | getTxHistory (LedgerIndex startIndex)=0 |
| getTxHistory Returns most recent 20 transactions starting from given number or entry. More... | |
| virtual bool | ledgerDbHasSpace (Config const &config)=0 |
| ledgerDbHasSpace Checks if ledger database has available space. More... | |
| virtual bool | transactionDbHasSpace (Config const &config)=0 |
| transactionDbHasSpace Checks if transaction database has available space. More... | |
Static Public Member Functions | |
| static std::unique_ptr< RelationalDBInterface > | init (Application &app, Config const &config, JobQueue &jobQueue) |
| init Creates and returns appropriate interface based on config. More... | |
Definition at line 27 of file RelationalDBInterfacePostgres.h.
|
inherited |
Definition at line 85 of file RelationalDBInterface.h.
|
inherited |
Definition at line 86 of file RelationalDBInterface.h.
|
inherited |
Definition at line 87 of file RelationalDBInterface.h.
|
inherited |
Definition at line 88 of file RelationalDBInterface.h.
|
inherited |
Definition at line 90 of file RelationalDBInterface.h.
|
inherited |
Definition at line 91 of file RelationalDBInterface.h.
|
inherited |
Definition at line 92 of file RelationalDBInterface.h.
|
inherited |
Definition at line 94 of file RelationalDBInterface.h.
|
pure virtual |
There is only one implementation of this interface: RelationalDBInterfacePostgresImp.
It wraps a stoppable object (PgPool) that does not follow RAII, and it does not go through the effort of following RAII either. The owner of the only object of that type (ApplicationImp) holds it by the type of its interface instead of its implementation, and thus the lifetime management methods need to be part of the interface.
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
sweep Sweep the database.
Method is specific for postgres backend.
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
getCompleteLedgers Returns string which contains list of completed ledgers.
Method is specific for postgres backend.
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
getValidatedLedgerAge Returns age of last validated ledger.
Method is specific for postgres backend.
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
writeLedgerAndTransactions Write new ledger and transaction data into database.
Method is specific for Postgres backend.
| info | Ledger info to write. |
| accountTxData | Transaction data to write |
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
getTxHashes Returns vector of tx hashes by given ledger sequence.
Method is specific to postgres backend.
| seq | Ledger sequence |
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
getAccountTx Get last account transactions specifies by passed argumenrs structure.
Function if specific to postgres backend.
| args | Arguments which specify account and whose tx to return. |
| app | Application |
| j | Journal |
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
locateTransaction Returns information used to locate a transaction.
Function is specific to postgres backend.
| id | Hash of the transaction. |
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
pure virtual |
isCaughtUp returns whether the database is caught up with the network
| [out] | reason | if the database is not caught up, reason contains a helpful message describing why |
Implemented in ripple::RelationalDBInterfacePostgresImp.
|
staticinherited |
init Creates and returns appropriate interface based on config.
| app | Application object. |
| config | Config object. |
| jobQueue | JobQueue object. |
Definition at line 40 of file RelationalDBInterface.cpp.
|
pure virtualinherited |
getMinLedgerSeq Returns minimum ledger sequence in Ledgers table.
Implemented in ripple::RelationalDBInterfacePostgresImp, and ripple::RelationalDBInterfaceSqliteImp.
|
pure virtualinherited |
getMaxLedgerSeq Returns maximum ledger sequence in Ledgers table.
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
getLedgerInfoByIndex Returns ledger by its sequence.
| ledgerSeq | Ledger sequence. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
getNewestLedgerInfo Returns info of newest saved ledger.
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
getLedgerInfoByHash Returns info of ledger with given hash.
| ledgerHash | Hash of the ledger. |
|
pure virtualinherited |
getHashByIndex Returns hash of ledger with given sequence.
| ledgerIndex | Ledger sequence. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
getHashesByIndex Returns hash of the ledger and hash of parent ledger for the ledger of given sequence.
| ledgerIndex | Ledger sequence. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
getHashesByIndex Returns hash of the ledger and hash of parent ledger for all ledgers with sequences from given minimum limit to given maximum limit.
| minSeq | Minimum ledger sequence. |
| maxSeq | Maximum ledger sequence. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
getTxHistory Returns most recent 20 transactions starting from given number or entry.
| startIndex | First number of returned entry. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
ledgerDbHasSpace Checks if ledger database has available space.
| config | Config object. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
|
pure virtualinherited |
transactionDbHasSpace Checks if transaction database has available space.
| config | Config object. |
Implemented in ripple::RelationalDBInterfaceSqliteImp, and ripple::RelationalDBInterfacePostgresImp.
1.8.17