rippled
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ripple::ApplicationImp Class Reference
Inheritance diagram for ripple::ApplicationImp:
Inheritance graph
[legend]
Collaboration diagram for ripple::ApplicationImp:
Collaboration graph
[legend]

Classes

class  io_latency_sampler
 

Public Types

using MutexType = std::recursive_mutex
 

Public Member Functions

 ApplicationImp (std::unique_ptr< Config > config, std::unique_ptr< Logs > logs, std::unique_ptr< TimeKeeper > timeKeeper)
 
bool setup () override
 
void doStart (bool withTimers) override
 
void run () override
 
bool isShutdown () override
 
void signalStop () override
 
bool checkSigs () const override
 
void checkSigs (bool) override
 
int fdRequired () const override
 
Logslogs () override
 
Configconfig () override
 
CollectorManagergetCollectorManager () override
 
FamilygetNodeFamily () override
 
FamilygetShardFamily () override
 
TimeKeepertimeKeeper () override
 
JobQueuegetJobQueue () override
 
std::pair< PublicKey, SecretKey > const & nodeIdentity () override
 
PublicKey const & getValidationPublicKey () const override
 
NetworkOPsgetOPs () override
 
boost::asio::io_service & getIOService () override
 
std::chrono::milliseconds getIOLatency () override
 
LedgerMastergetLedgerMaster () override
 
InboundLedgersgetInboundLedgers () override
 
InboundTransactionsgetInboundTransactions () override
 
TaggedCache< uint256, AcceptedLedger > & getAcceptedLedgerCache () override
 
void gotTXSet (std::shared_ptr< SHAMap > const &set, bool fromAcquire)
 
TransactionMastergetMasterTransaction () override
 
perf::PerfLoggetPerfLog () override
 
NodeCachegetTempNodeCache () override
 
NodeStore::DatabasegetNodeStore () override
 
NodeStore::DatabaseShardgetShardStore () override
 
RPC::ShardArchiveHandlergetShardArchiveHandler (bool tryRecovery) override
 
Application::MutexTypegetMasterMutex () override
 
LoadManagergetLoadManager () override
 
Resource::ManagergetResourceManager () override
 
OrderBookDBgetOrderBookDB () override
 
PathRequestsgetPathRequests () override
 
CachedSLEscachedSLEs () override
 
AmendmentTablegetAmendmentTable () override
 
LoadFeeTrackgetFeeTrack () override
 
HashRoutergetHashRouter () override
 
RCLValidationsgetValidations () override
 
ValidatorListvalidators () override
 
ValidatorSitevalidatorSites () override
 
ManifestCachevalidatorManifests () override
 
ManifestCachepublisherManifests () override
 
Clustercluster () override
 
PeerReservationTablepeerReservations () override
 
SHAMapStoregetSHAMapStore () override
 
PendingSavespendingSaves () override
 
AccountIDCache const & accountIDCache () const override
 
OpenLedgeropenLedger () override
 
OpenLedger const & openLedger () const override
 
Overlayoverlay () override
 
TxQgetTxQ () override
 
DatabaseCongetTxnDB () override
 
DatabaseCongetLedgerDB () override
 
DatabaseCongetWalletDB () override
 Retrieve the "wallet database". More...
 
bool serverOkay (std::string &reason) override
 
beast::Journal journal (std::string const &name) override
 
bool initSQLiteDBs ()
 
bool initNodeStore ()
 
void onPrepare () override
 Override called during preparation. More...
 
void onStart () override
 Override called during start. More...
 
void onStop () override
 Override called when the stop notification is issued. More...
 
void onWrite (beast::PropertyStream::Map &stream) override
 Subclass override. More...
 
void setSweepTimer ()
 
void setEntropyTimer ()
 
void doSweep ()
 
LedgerIndex getMaxDisallowedLedger () override
 Ensure that a newly-started validator does not sign proposals older than the last ledger it persisted. More...
 
std::string const & name () const
 Returns the name of this source. More...
 
void add (Source &source)
 Add a child source. More...
 
template<class Derived >
Derived * add (Derived *child)
 Add a child source by pointer. More...
 
void remove (Source &child)
 Remove a child source from this Source. More...
 
void removeAll ()
 Remove all child sources from this Source. More...
 
void write_one (PropertyStream &stream)
 Write only this Source to the stream. More...
 
void write (PropertyStream &stream)
 write this source and all its children recursively to the stream. More...
 
void write (PropertyStream &stream, std::string const &path)
 Parse the path and write the corresponding Source and optional children. More...
 
std::pair< Source *, bool > find (std::string path)
 Parse the dot-delimited Source path and return the result. More...
 
Sourcefind_one_deep (std::string const &name)
 
PropertyStream::Source * find_path (std::string path)
 
PropertyStream::Source * find_one (std::string const &name)
 
bool isStopping () const
 
void prepare ()
 Prepare all contained Stoppable objects. More...
 
void start ()
 Start all contained Stoppable objects. More...
 
void stop (beast::Journal j)
 Notify a root stoppable and children to stop, and block until stopped. More...
 
bool started () const
 Return true if start() was ever called. More...
 
JobCounterjobCounter ()
 
bool alertable_sleep_until (std::chrono::system_clock::time_point const &t)
 Sleep or wake up on stop. More...
 
RootStoppablegetRoot ()
 
void setParent (Stoppable &parent)
 Set the parent of this Stoppable. More...
 
bool isStopped () const
 Returns true if the requested stop has completed. More...
 
bool areChildrenStopped () const
 Returns true if all children have stopped. More...
 
boost::asio::io_service & get_io_service ()
 

Static Public Member Functions

static std::size_t numberOfThreads (Config const &config)
 
static bool peel_leading_slash (std::string *path)
 
static bool peel_trailing_slashstar (std::string *path)
 
static std::string peel_name (std::string *path)
 

Public Attributes

std::unique_ptr< Configconfig_
 
std::unique_ptr< Logslogs_
 
std::unique_ptr< TimeKeepertimeKeeper_
 
beast::Journal m_journal
 
std::unique_ptr< perf::PerfLogperfLog_
 
Application::MutexType m_masterMutex
 
TransactionMaster m_txMaster
 
NodeStoreScheduler m_nodeStoreScheduler
 
std::unique_ptr< SHAMapStorem_shaMapStore
 
PendingSaves pendingSaves_
 
AccountIDCache accountIDCache_
 
boost::optional< OpenLedgeropenLedger_
 
NodeCache m_tempNodeCache
 
std::unique_ptr< CollectorManagerm_collectorManager
 
CachedSLEs cachedSLEs_
 
std::pair< PublicKey, SecretKeynodeIdentity_
 
const ValidatorKeys validatorKeys_
 
std::unique_ptr< Resource::Managerm_resourceManager
 
std::unique_ptr< JobQueuem_jobQueue
 
std::unique_ptr< NodeStore::Databasem_nodeStore
 
NodeFamily nodeFamily_
 
std::unique_ptr< NodeStore::DatabaseShardshardStore_
 
std::unique_ptr< ShardFamilyshardFamily_
 
std::unique_ptr< RPC::ShardArchiveHandlershardArchiveHandler_
 
OrderBookDB m_orderBookDB
 
std::unique_ptr< PathRequestsm_pathRequests
 
std::unique_ptr< LedgerMasterm_ledgerMaster
 
std::unique_ptr< InboundLedgersm_inboundLedgers
 
std::unique_ptr< InboundTransactionsm_inboundTransactions
 
TaggedCache< uint256, AcceptedLedgerm_acceptedLedgerCache
 
std::unique_ptr< NetworkOPsm_networkOPs
 
std::unique_ptr< Clustercluster_
 
std::unique_ptr< PeerReservationTablepeerReservations_
 
std::unique_ptr< ManifestCachevalidatorManifests_
 
std::unique_ptr< ManifestCachepublisherManifests_
 
std::unique_ptr< ValidatorListvalidators_
 
std::unique_ptr< ValidatorSitevalidatorSites_
 
std::unique_ptr< ServerHandlerserverHandler_
 
std::unique_ptr< AmendmentTablem_amendmentTable
 
std::unique_ptr< LoadFeeTrackmFeeTrack
 
std::unique_ptr< HashRouterhashRouter_
 
RCLValidations mValidations
 
std::unique_ptr< LoadManagerm_loadManager
 
std::unique_ptr< TxQtxQ_
 
ClosureCounter< void, boost::system::error_code const & > waitHandlerCounter_
 
boost::asio::steady_timer sweepTimer_
 
boost::asio::steady_timer entropyTimer_
 
bool startTimers_
 
std::unique_ptr< DatabaseConmTxnDB
 
std::unique_ptr< DatabaseConmLedgerDB
 
std::unique_ptr< DatabaseConmWalletDB
 
std::unique_ptr< Overlayoverlay_
 
std::vector< std::unique_ptr< Stoppable > > websocketServers_
 
boost::asio::signal_set m_signals
 
std::condition_variable cv_
 
std::mutex mut_
 
bool isTimeToStop = false
 
std::atomic< bool > checkSigs_
 
std::unique_ptr< ResolverAsiom_resolver
 
io_latency_sampler m_io_latency_sampler
 
std::unique_ptr< GRPCServergrpcServer_
 

Protected Member Functions

void stopped ()
 Called by derived classes to indicate that the stoppable has stopped. More...
 

Private Types

using Children = beast::LockFreeStack< Child >
 

Private Member Functions

bool nodeToShards ()
 
bool validateShards ()
 
void startGenesisLedger ()
 
std::shared_ptr< LedgergetLastFullLedger ()
 
std::shared_ptr< LedgerloadLedgerFromFile (std::string const &ledgerID)
 
bool loadOldLedger (std::string const &ledgerID, bool replay, bool isFilename)
 
void setMaxDisallowedLedger ()
 
bool stopAsync (beast::Journal j)
 
virtual void onChildrenStopped ()
 Override called when all children have stopped. More...
 
void prepareRecursive ()
 
void startRecursive ()
 
void stopAsyncRecursive (beast::Journal j)
 
void stopRecursive (beast::Journal j)
 

Private Attributes

std::atomic< LedgerIndexmaxDisallowedLedger_ {0}
 
const std::string m_name
 
std::recursive_mutex lock_
 
Item item_
 
Sourceparent_
 
List< Item > children_
 
std::atomic< bool > m_prepared {false}
 
std::atomic< bool > m_started {false}
 
std::atomic< bool > m_calledStop {false}
 
std::mutex m_
 
std::condition_variable c_
 
JobCounter jobCounter_
 
RootStoppablem_root
 
Child m_child
 
std::atomic< bool > m_stopped {false}
 
std::atomic< bool > m_childrenStopped {false}
 
Children m_children
 
std::condition_variable m_cv
 
std::mutex m_mut
 
bool m_is_stopping = false
 
bool hasParent_ {false}
 
boost::optional< boost::asio::io_service::work > work_
 
std::vector< std::threadthreads_
 
boost::asio::io_service io_service_
 

Detailed Description

Definition at line 82 of file Application.cpp.

Member Typedef Documentation

◆ MutexType

Definition at line 111 of file Application.h.

◆ Children

Definition at line 319 of file Stoppable.h.

Constructor & Destructor Documentation

◆ ApplicationImp()

ripple::ApplicationImp::ApplicationImp ( std::unique_ptr< Config config,
std::unique_ptr< Logs logs,
std::unique_ptr< TimeKeeper timeKeeper 
)

Definition at line 251 of file Application.cpp.

Member Function Documentation

◆ numberOfThreads()

static std::size_t ripple::ApplicationImp::numberOfThreads ( Config const &  config)
static

Definition at line 232 of file Application.cpp.

◆ setup()

bool ripple::ApplicationImp::setup ( )
overridevirtual

Implements ripple::Application.

Definition at line 1266 of file Application.cpp.

◆ doStart()

void ripple::ApplicationImp::doStart ( bool  withTimers)
overridevirtual

Implements ripple::Application.

Definition at line 1638 of file Application.cpp.

◆ run()

void ripple::ApplicationImp::run ( )
overridevirtual

Implements ripple::Application.

Definition at line 1646 of file Application.cpp.

◆ isShutdown()

bool ripple::ApplicationImp::isShutdown ( )
overridevirtual

Implements ripple::Application.

Definition at line 1684 of file Application.cpp.

◆ signalStop()

void ripple::ApplicationImp::signalStop ( )
overridevirtual

Implements ripple::Application.

Definition at line 1670 of file Application.cpp.

◆ checkSigs() [1/2]

bool ripple::ApplicationImp::checkSigs ( ) const
overridevirtual

Implements ripple::Application.

Definition at line 1691 of file Application.cpp.

◆ checkSigs() [2/2]

void ripple::ApplicationImp::checkSigs ( bool  check)
overridevirtual

Implements ripple::Application.

Definition at line 1697 of file Application.cpp.

◆ fdRequired()

int ripple::ApplicationImp::fdRequired ( ) const
overridevirtual

Implements ripple::Application.

Definition at line 1703 of file Application.cpp.

◆ logs()

Logs& ripple::ApplicationImp::logs ( )
overridevirtual

Implements ripple::Application.

Definition at line 489 of file Application.cpp.

◆ config()

Config& ripple::ApplicationImp::config ( )
overridevirtual

Implements ripple::Application.

Definition at line 495 of file Application.cpp.

◆ getCollectorManager()

CollectorManager& ripple::ApplicationImp::getCollectorManager ( )
overridevirtual

Implements ripple::Application.

Definition at line 501 of file Application.cpp.

◆ getNodeFamily()

Family& ripple::ApplicationImp::getNodeFamily ( )
overridevirtual

Implements ripple::Application.

Definition at line 507 of file Application.cpp.

◆ getShardFamily()

Family* ripple::ApplicationImp::getShardFamily ( )
overridevirtual

Implements ripple::Application.

Definition at line 515 of file Application.cpp.

◆ timeKeeper()

TimeKeeper& ripple::ApplicationImp::timeKeeper ( )
overridevirtual

Implements ripple::Application.

Definition at line 521 of file Application.cpp.

◆ getJobQueue()

JobQueue& ripple::ApplicationImp::getJobQueue ( )
overridevirtual

Implements ripple::Application.

Definition at line 527 of file Application.cpp.

◆ nodeIdentity()

std::pair<PublicKey, SecretKey> const& ripple::ApplicationImp::nodeIdentity ( )
overridevirtual

Implements ripple::Application.

Definition at line 533 of file Application.cpp.

◆ getValidationPublicKey()

PublicKey const& ripple::ApplicationImp::getValidationPublicKey ( ) const
overridevirtual

Implements ripple::Application.

Definition at line 539 of file Application.cpp.

◆ getOPs()

NetworkOPs& ripple::ApplicationImp::getOPs ( )
overridevirtual

Implements ripple::Application.

Definition at line 545 of file Application.cpp.

◆ getIOService()

boost::asio::io_service& ripple::ApplicationImp::getIOService ( )
overridevirtual

Implements ripple::Application.

Definition at line 551 of file Application.cpp.

◆ getIOLatency()

std::chrono::milliseconds ripple::ApplicationImp::getIOLatency ( )
overridevirtual

Implements ripple::Application.

Definition at line 557 of file Application.cpp.

◆ getLedgerMaster()

LedgerMaster& ripple::ApplicationImp::getLedgerMaster ( )
overridevirtual

Implements ripple::Application.

Definition at line 563 of file Application.cpp.

◆ getInboundLedgers()

InboundLedgers& ripple::ApplicationImp::getInboundLedgers ( )
overridevirtual

Implements ripple::Application.

Definition at line 569 of file Application.cpp.

◆ getInboundTransactions()

InboundTransactions& ripple::ApplicationImp::getInboundTransactions ( )
overridevirtual

Implements ripple::Application.

Definition at line 575 of file Application.cpp.

◆ getAcceptedLedgerCache()

TaggedCache<uint256, AcceptedLedger>& ripple::ApplicationImp::getAcceptedLedgerCache ( )
overridevirtual

Implements ripple::Application.

Definition at line 581 of file Application.cpp.

◆ gotTXSet()

void ripple::ApplicationImp::gotTXSet ( std::shared_ptr< SHAMap > const &  set,
bool  fromAcquire 
)

Definition at line 587 of file Application.cpp.

◆ getMasterTransaction()

TransactionMaster& ripple::ApplicationImp::getMasterTransaction ( )
overridevirtual

Implements ripple::Application.

Definition at line 594 of file Application.cpp.

◆ getPerfLog()

perf::PerfLog& ripple::ApplicationImp::getPerfLog ( )
overridevirtual

Implements ripple::Application.

Definition at line 600 of file Application.cpp.

◆ getTempNodeCache()

NodeCache& ripple::ApplicationImp::getTempNodeCache ( )
overridevirtual

Implements ripple::Application.

Definition at line 606 of file Application.cpp.

◆ getNodeStore()

NodeStore::Database& ripple::ApplicationImp::getNodeStore ( )
overridevirtual

Implements ripple::Application.

Definition at line 612 of file Application.cpp.

◆ getShardStore()

NodeStore::DatabaseShard* ripple::ApplicationImp::getShardStore ( )
overridevirtual

Implements ripple::Application.

Definition at line 620 of file Application.cpp.

◆ getShardArchiveHandler()

RPC::ShardArchiveHandler* ripple::ApplicationImp::getShardArchiveHandler ( bool  tryRecovery)
overridevirtual

Implements ripple::Application.

Definition at line 626 of file Application.cpp.

◆ getMasterMutex()

Application::MutexType& ripple::ApplicationImp::getMasterMutex ( )
overridevirtual

Implements ripple::Application.

Definition at line 684 of file Application.cpp.

◆ getLoadManager()

LoadManager& ripple::ApplicationImp::getLoadManager ( )
overridevirtual

Implements ripple::Application.

Definition at line 690 of file Application.cpp.

◆ getResourceManager()

Resource::Manager& ripple::ApplicationImp::getResourceManager ( )
overridevirtual

Implements ripple::Application.

Definition at line 696 of file Application.cpp.

◆ getOrderBookDB()

OrderBookDB& ripple::ApplicationImp::getOrderBookDB ( )
overridevirtual

Implements ripple::Application.

Definition at line 702 of file Application.cpp.

◆ getPathRequests()

PathRequests& ripple::ApplicationImp::getPathRequests ( )
overridevirtual

Implements ripple::Application.

Definition at line 708 of file Application.cpp.

◆ cachedSLEs()

CachedSLEs& ripple::ApplicationImp::cachedSLEs ( )
overridevirtual

Implements ripple::Application.

Definition at line 714 of file Application.cpp.

◆ getAmendmentTable()

AmendmentTable& ripple::ApplicationImp::getAmendmentTable ( )
overridevirtual

Implements ripple::Application.

Definition at line 720 of file Application.cpp.

◆ getFeeTrack()

LoadFeeTrack& ripple::ApplicationImp::getFeeTrack ( )
overridevirtual

Implements ripple::Application.

Definition at line 726 of file Application.cpp.

◆ getHashRouter()

HashRouter& ripple::ApplicationImp::getHashRouter ( )
overridevirtual

Implements ripple::Application.

Definition at line 732 of file Application.cpp.

◆ getValidations()

RCLValidations& ripple::ApplicationImp::getValidations ( )
overridevirtual

Implements ripple::Application.

Definition at line 738 of file Application.cpp.

◆ validators()

ValidatorList& ripple::ApplicationImp::validators ( )
overridevirtual

Implements ripple::Application.

Definition at line 744 of file Application.cpp.

◆ validatorSites()

ValidatorSite& ripple::ApplicationImp::validatorSites ( )
overridevirtual

Implements ripple::Application.

Definition at line 750 of file Application.cpp.

◆ validatorManifests()

ManifestCache& ripple::ApplicationImp::validatorManifests ( )
overridevirtual

Implements ripple::Application.

Definition at line 756 of file Application.cpp.

◆ publisherManifests()

ManifestCache& ripple::ApplicationImp::publisherManifests ( )
overridevirtual

Implements ripple::Application.

Definition at line 762 of file Application.cpp.

◆ cluster()

Cluster& ripple::ApplicationImp::cluster ( )
overridevirtual

Implements ripple::Application.

Definition at line 768 of file Application.cpp.

◆ peerReservations()

PeerReservationTable& ripple::ApplicationImp::peerReservations ( )
overridevirtual

Implements ripple::Application.

Definition at line 774 of file Application.cpp.

◆ getSHAMapStore()

SHAMapStore& ripple::ApplicationImp::getSHAMapStore ( )
overridevirtual

Implements ripple::Application.

Definition at line 780 of file Application.cpp.

◆ pendingSaves()

PendingSaves& ripple::ApplicationImp::pendingSaves ( )
overridevirtual

Implements ripple::Application.

Definition at line 786 of file Application.cpp.

◆ accountIDCache()

AccountIDCache const& ripple::ApplicationImp::accountIDCache ( ) const
overridevirtual

Implements ripple::Application.

Definition at line 792 of file Application.cpp.

◆ openLedger() [1/2]

OpenLedger& ripple::ApplicationImp::openLedger ( )
overridevirtual

Implements ripple::Application.

Definition at line 798 of file Application.cpp.

◆ openLedger() [2/2]

OpenLedger const& ripple::ApplicationImp::openLedger ( ) const
overridevirtual

Implements ripple::Application.

Definition at line 804 of file Application.cpp.

◆ overlay()

Overlay& ripple::ApplicationImp::overlay ( )
overridevirtual

Implements ripple::Application.

Definition at line 810 of file Application.cpp.

◆ getTxQ()

TxQ& ripple::ApplicationImp::getTxQ ( )
overridevirtual

Implements ripple::Application.

Definition at line 817 of file Application.cpp.

◆ getTxnDB()

DatabaseCon& ripple::ApplicationImp::getTxnDB ( )
overridevirtual

Implements ripple::Application.

Definition at line 824 of file Application.cpp.

◆ getLedgerDB()

DatabaseCon& ripple::ApplicationImp::getLedgerDB ( )
overridevirtual

Implements ripple::Application.

Definition at line 830 of file Application.cpp.

◆ getWalletDB()

DatabaseCon& ripple::ApplicationImp::getWalletDB ( )
overridevirtual

Retrieve the "wallet database".

Implements ripple::Application.

Definition at line 836 of file Application.cpp.

◆ serverOkay()

bool ripple::ApplicationImp::serverOkay ( std::string reason)
overridevirtual

Implements ripple::Application.

Definition at line 2108 of file Application.cpp.

◆ journal()

beast::Journal ripple::ApplicationImp::journal ( std::string const &  name)
overridevirtual

Implements ripple::Application.

Definition at line 2150 of file Application.cpp.

◆ initSQLiteDBs()

bool ripple::ApplicationImp::initSQLiteDBs ( )

Definition at line 851 of file Application.cpp.

◆ initNodeStore()

bool ripple::ApplicationImp::initNodeStore ( )

Definition at line 933 of file Application.cpp.

◆ onPrepare()

void ripple::ApplicationImp::onPrepare ( )
overridevirtual

Override called during preparation.

Since all other Stoppable objects in the tree have already been constructed, this provides an opportunity to perform initialization which depends on calling into other Stoppable objects. This call is made on the same thread that called prepare(). The default implementation does nothing. Guaranteed to only be called once.

Reimplemented from ripple::Stoppable.

Definition at line 982 of file Application.cpp.

◆ onStart()

void ripple::ApplicationImp::onStart ( )
overridevirtual

Override called during start.

Reimplemented from ripple::Stoppable.

Definition at line 987 of file Application.cpp.

◆ onStop()

void ripple::ApplicationImp::onStop ( )
overridevirtual

Override called when the stop notification is issued.

The call is made on an unspecified, implementation-specific thread. onStop and onChildrenStopped will never be called concurrently, across all Stoppable objects descended from the same root, inclusive of the root.

It is safe to call isStopping, isStopped, and areChildrenStopped from within this function; The values returned will always be valid and never change during the callback.

The default implementation simply calls stopped(). This is applicable when the Stoppable has a trivial stop operation (or no stop operation), and we are merely using the Stoppable API to position it as a dependency of some parent service.

Thread safety: May not block for long periods. Guaranteed only to be called once. Must be safe to call from any thread at any time.

Reimplemented from ripple::Stoppable.

Definition at line 1006 of file Application.cpp.

◆ onWrite()

void ripple::ApplicationImp::onWrite ( beast::PropertyStream::Map )
overridevirtual

Subclass override.

The default version does nothing.

Reimplemented from beast::PropertyStream::Source.

Definition at line 1078 of file Application.cpp.

◆ setSweepTimer()

void ripple::ApplicationImp::setSweepTimer ( )

Definition at line 1085 of file Application.cpp.

◆ setEntropyTimer()

void ripple::ApplicationImp::setEntropyTimer ( )

Definition at line 1116 of file Application.cpp.

◆ doSweep()

void ripple::ApplicationImp::doSweep ( )

Definition at line 1145 of file Application.cpp.

◆ getMaxDisallowedLedger()

LedgerIndex ripple::ApplicationImp::getMaxDisallowedLedger ( )
overridevirtual

Ensure that a newly-started validator does not sign proposals older than the last ledger it persisted.

Implements ripple::Application.

Definition at line 1232 of file Application.cpp.

◆ nodeToShards()

bool ripple::ApplicationImp::nodeToShards ( )
private

Definition at line 2156 of file Application.cpp.

◆ validateShards()

bool ripple::ApplicationImp::validateShards ( )
private

Definition at line 2177 of file Application.cpp.

◆ startGenesisLedger()

void ripple::ApplicationImp::startGenesisLedger ( )
private

Definition at line 1730 of file Application.cpp.

◆ getLastFullLedger()

std::shared_ptr< Ledger > ripple::ApplicationImp::getLastFullLedger ( )
private

Definition at line 1750 of file Application.cpp.

◆ loadLedgerFromFile()

std::shared_ptr< Ledger > ripple::ApplicationImp::loadLedgerFromFile ( std::string const &  ledgerID)
private

Definition at line 1791 of file Application.cpp.

◆ loadOldLedger()

bool ripple::ApplicationImp::loadOldLedger ( std::string const &  ledgerID,
bool  replay,
bool  isFilename 
)
private

Definition at line 1927 of file Application.cpp.

◆ setMaxDisallowedLedger()

void ripple::ApplicationImp::setMaxDisallowedLedger ( )
private

Definition at line 2198 of file Application.cpp.

◆ name()

std::string const & beast::PropertyStream::Source::name ( ) const
inherited

Returns the name of this source.

Definition at line 190 of file beast_PropertyStream.cpp.

◆ add() [1/2]

void beast::PropertyStream::Source::add ( Source source)
inherited

Add a child source.

Definition at line 196 of file beast_PropertyStream.cpp.

◆ add() [2/2]

template<class Derived >
Derived* beast::PropertyStream::Source::add ( Derived *  child)
inherited

Add a child source by pointer.

The source pointer is returned so it can be used in ctor-initializers.

Definition at line 372 of file PropertyStream.h.

◆ remove()

void beast::PropertyStream::Source::remove ( Source child)
inherited

Remove a child source from this Source.

Definition at line 208 of file beast_PropertyStream.cpp.

◆ removeAll()

void beast::PropertyStream::Source::removeAll ( )
inherited

Remove all child sources from this Source.

Definition at line 220 of file beast_PropertyStream.cpp.

◆ write_one()

void beast::PropertyStream::Source::write_one ( PropertyStream stream)
inherited

Write only this Source to the stream.

Definition at line 233 of file beast_PropertyStream.cpp.

◆ write() [1/2]

void beast::PropertyStream::Source::write ( PropertyStream stream)
inherited

write this source and all its children recursively to the stream.

Definition at line 240 of file beast_PropertyStream.cpp.

◆ write() [2/2]

void beast::PropertyStream::Source::write ( PropertyStream stream,
std::string const &  path 
)
inherited

Parse the path and write the corresponding Source and optional children.

If the source is found, it is written. If the wildcard character '*' exists as the last character in the path, then all the children are written recursively.

Definition at line 252 of file beast_PropertyStream.cpp.

◆ find()

std::pair< PropertyStream::Source *, bool > beast::PropertyStream::Source::find ( std::string  path)
inherited

Parse the dot-delimited Source path and return the result.

The first value will be a pointer to the Source object corresponding to the given path. If no Source object exists, then the first value will be nullptr and the second value will be undefined. The second value is a boolean indicating whether or not the path string specifies the wildcard character '*' as the last character.

print statement examples "parent.child" prints child and all of its children "parent.child." start at the parent and print down to child "parent.grandchild" prints nothing- grandchild not direct discendent "parent.grandchild." starts at the parent and prints down to grandchild "parent.grandchild.*" starts at parent, print through grandchild children

Definition at line 266 of file beast_PropertyStream.cpp.

◆ find_one_deep()

PropertyStream::Source * beast::PropertyStream::Source::find_one_deep ( std::string const &  name)
inherited

Definition at line 333 of file beast_PropertyStream.cpp.

◆ find_path()

PropertyStream::Source * beast::PropertyStream::Source::find_path ( std::string  path)
inherited

Definition at line 350 of file beast_PropertyStream.cpp.

◆ find_one()

PropertyStream::Source * beast::PropertyStream::Source::find_one ( std::string const &  name)
inherited

Definition at line 368 of file beast_PropertyStream.cpp.

◆ peel_leading_slash()

bool beast::PropertyStream::Source::peel_leading_slash ( std::string path)
staticinherited

Definition at line 286 of file beast_PropertyStream.cpp.

◆ peel_trailing_slashstar()

bool beast::PropertyStream::Source::peel_trailing_slashstar ( std::string path)
staticinherited

Definition at line 297 of file beast_PropertyStream.cpp.

◆ peel_name()

std::string beast::PropertyStream::Source::peel_name ( std::string path)
staticinherited

Definition at line 313 of file beast_PropertyStream.cpp.

◆ isStopping()

bool ripple::RootStoppable::isStopping ( ) const
inherited

Definition at line 175 of file Stoppable.cpp.

◆ prepare()

void ripple::RootStoppable::prepare ( )
inherited

Prepare all contained Stoppable objects.

This calls onPrepare for all Stoppable objects in the tree. Calls made after the first have no effect. Thread safety: May be called from any thread.

Definition at line 181 of file Stoppable.cpp.

◆ start()

void ripple::RootStoppable::start ( )
inherited

Start all contained Stoppable objects.

The default implementation does nothing. Calls made after the first have no effect. Thread safety: May be called from any thread.

Definition at line 188 of file Stoppable.cpp.

◆ stop()

void ripple::RootStoppable::stop ( beast::Journal  j)
inherited

Notify a root stoppable and children to stop, and block until stopped.

Has no effect if the stoppable was already notified. This blocks until the stoppable and all of its children have stopped. Undefined behavior results if stop() is called without a previous call to start(). Thread safety: Safe to call from any thread not associated with a Stoppable.

Definition at line 199 of file Stoppable.cpp.

◆ started()

bool ripple::RootStoppable::started ( ) const
inherited

Return true if start() was ever called.

Definition at line 394 of file Stoppable.h.

◆ jobCounter()

JobCounter& ripple::RootStoppable::jobCounter ( )
inherited

Definition at line 401 of file Stoppable.h.

◆ alertable_sleep_until()

bool ripple::RootStoppable::alertable_sleep_until ( std::chrono::system_clock::time_point const &  t)
inherited

Sleep or wake up on stop.

Returns
true if we are stopping

Definition at line 445 of file Stoppable.h.

◆ stopAsync()

bool ripple::RootStoppable::stopAsync ( beast::Journal  j)
privateinherited

Definition at line 209 of file Stoppable.cpp.

◆ getRoot()

RootStoppable& ripple::Stoppable::getRoot ( )
inherited

Definition at line 214 of file Stoppable.h.

◆ setParent()

void ripple::Stoppable::setParent ( Stoppable parent)
inherited

Set the parent of this Stoppable.

Note
The Stoppable must not already have a parent. The parent to be set cannot not be stopping. Both roots must match.

Definition at line 43 of file Stoppable.cpp.

◆ isStopped()

bool ripple::Stoppable::isStopped ( ) const
inherited

Returns true if the requested stop has completed.

Definition at line 60 of file Stoppable.cpp.

◆ areChildrenStopped()

bool ripple::Stoppable::areChildrenStopped ( ) const
inherited

Returns true if all children have stopped.

Definition at line 66 of file Stoppable.cpp.

◆ stopped()

void ripple::Stoppable::stopped ( )
protectedinherited

Called by derived classes to indicate that the stoppable has stopped.

Definition at line 72 of file Stoppable.cpp.

◆ onChildrenStopped()

void ripple::Stoppable::onChildrenStopped ( )
privatevirtualinherited

Override called when all children have stopped.

The call is made on an unspecified, implementation-specific thread. onStop and onChildrenStopped will never be called concurrently, across all Stoppable objects descended from the same root, inclusive of the root.

It is safe to call isStopping, isStopped, and areChildrenStopped from within this function; The values returned will always be valid and never change during the callback.

The default implementation does nothing.

Thread safety: May not block for long periods. Guaranteed only to be called once. Must be safe to call from any thread at any time.

Reimplemented in ripple::OverlayImpl, ripple::test::Stoppable_test::Root, ripple::test::Stoppable_test::C, ripple::test::Stoppable_test::I, ripple::test::Stoppable_test::B, ripple::JobQueue, ripple::test::Stoppable_test::H, ripple::test::Stoppable_test::G, ripple::SHAMapStoreImp, ripple::test::Stoppable_test::A, ripple::NodeStore::Database, ripple::perf::PerfLogImp, ripple::test::Stoppable_test::F, ripple::test::Stoppable_test::E, ripple::test::Stoppable_test::J, ripple::PerfLog_test::PerfLogParent, ripple::test::Stoppable_test::D, and ripple::NodeStoreScheduler.

Definition at line 96 of file Stoppable.cpp.

◆ prepareRecursive()

void ripple::Stoppable::prepareRecursive ( )
privateinherited

Definition at line 103 of file Stoppable.cpp.

◆ startRecursive()

void ripple::Stoppable::startRecursive ( )
privateinherited

Definition at line 113 of file Stoppable.cpp.

◆ stopAsyncRecursive()

void ripple::Stoppable::stopAsyncRecursive ( beast::Journal  j)
privateinherited

Definition at line 123 of file Stoppable.cpp.

◆ stopRecursive()

void ripple::Stoppable::stopRecursive ( beast::Journal  j)
privateinherited

Definition at line 134 of file Stoppable.cpp.

◆ get_io_service()

boost::asio::io_service& BasicApp::get_io_service ( )
inherited

Definition at line 41 of file BasicApp.h.

Member Data Documentation

◆ config_

std::unique_ptr<Config> ripple::ApplicationImp::config_

Definition at line 150 of file Application.cpp.

◆ logs_

std::unique_ptr<Logs> ripple::ApplicationImp::logs_

Definition at line 151 of file Application.cpp.

◆ timeKeeper_

std::unique_ptr<TimeKeeper> ripple::ApplicationImp::timeKeeper_

Definition at line 152 of file Application.cpp.

◆ m_journal

beast::Journal ripple::ApplicationImp::m_journal

Definition at line 154 of file Application.cpp.

◆ perfLog_

std::unique_ptr<perf::PerfLog> ripple::ApplicationImp::perfLog_

Definition at line 155 of file Application.cpp.

◆ m_masterMutex

Application::MutexType ripple::ApplicationImp::m_masterMutex

Definition at line 156 of file Application.cpp.

◆ m_txMaster

TransactionMaster ripple::ApplicationImp::m_txMaster

Definition at line 159 of file Application.cpp.

◆ m_nodeStoreScheduler

NodeStoreScheduler ripple::ApplicationImp::m_nodeStoreScheduler

Definition at line 161 of file Application.cpp.

◆ m_shaMapStore

std::unique_ptr<SHAMapStore> ripple::ApplicationImp::m_shaMapStore

Definition at line 162 of file Application.cpp.

◆ pendingSaves_

PendingSaves ripple::ApplicationImp::pendingSaves_

Definition at line 163 of file Application.cpp.

◆ accountIDCache_

AccountIDCache ripple::ApplicationImp::accountIDCache_

Definition at line 164 of file Application.cpp.

◆ openLedger_

boost::optional<OpenLedger> ripple::ApplicationImp::openLedger_

Definition at line 165 of file Application.cpp.

◆ m_tempNodeCache

NodeCache ripple::ApplicationImp::m_tempNodeCache

Definition at line 168 of file Application.cpp.

◆ m_collectorManager

std::unique_ptr<CollectorManager> ripple::ApplicationImp::m_collectorManager

Definition at line 169 of file Application.cpp.

◆ cachedSLEs_

CachedSLEs ripple::ApplicationImp::cachedSLEs_

Definition at line 170 of file Application.cpp.

◆ nodeIdentity_

std::pair<PublicKey, SecretKey> ripple::ApplicationImp::nodeIdentity_

Definition at line 171 of file Application.cpp.

◆ validatorKeys_

const ValidatorKeys ripple::ApplicationImp::validatorKeys_

Definition at line 172 of file Application.cpp.

◆ m_resourceManager

std::unique_ptr<Resource::Manager> ripple::ApplicationImp::m_resourceManager

Definition at line 174 of file Application.cpp.

◆ m_jobQueue

std::unique_ptr<JobQueue> ripple::ApplicationImp::m_jobQueue

Definition at line 177 of file Application.cpp.

◆ m_nodeStore

std::unique_ptr<NodeStore::Database> ripple::ApplicationImp::m_nodeStore

Definition at line 178 of file Application.cpp.

◆ nodeFamily_

NodeFamily ripple::ApplicationImp::nodeFamily_

Definition at line 179 of file Application.cpp.

◆ shardStore_

std::unique_ptr<NodeStore::DatabaseShard> ripple::ApplicationImp::shardStore_

Definition at line 180 of file Application.cpp.

◆ shardFamily_

std::unique_ptr<ShardFamily> ripple::ApplicationImp::shardFamily_

Definition at line 181 of file Application.cpp.

◆ shardArchiveHandler_

std::unique_ptr<RPC::ShardArchiveHandler> ripple::ApplicationImp::shardArchiveHandler_

Definition at line 182 of file Application.cpp.

◆ m_orderBookDB

OrderBookDB ripple::ApplicationImp::m_orderBookDB

Definition at line 184 of file Application.cpp.

◆ m_pathRequests

std::unique_ptr<PathRequests> ripple::ApplicationImp::m_pathRequests

Definition at line 185 of file Application.cpp.

◆ m_ledgerMaster

std::unique_ptr<LedgerMaster> ripple::ApplicationImp::m_ledgerMaster

Definition at line 186 of file Application.cpp.

◆ m_inboundLedgers

std::unique_ptr<InboundLedgers> ripple::ApplicationImp::m_inboundLedgers

Definition at line 187 of file Application.cpp.

◆ m_inboundTransactions

std::unique_ptr<InboundTransactions> ripple::ApplicationImp::m_inboundTransactions

Definition at line 188 of file Application.cpp.

◆ m_acceptedLedgerCache

TaggedCache<uint256, AcceptedLedger> ripple::ApplicationImp::m_acceptedLedgerCache

Definition at line 189 of file Application.cpp.

◆ m_networkOPs

std::unique_ptr<NetworkOPs> ripple::ApplicationImp::m_networkOPs

Definition at line 190 of file Application.cpp.

◆ cluster_

std::unique_ptr<Cluster> ripple::ApplicationImp::cluster_

Definition at line 191 of file Application.cpp.

◆ peerReservations_

std::unique_ptr<PeerReservationTable> ripple::ApplicationImp::peerReservations_

Definition at line 192 of file Application.cpp.

◆ validatorManifests_

std::unique_ptr<ManifestCache> ripple::ApplicationImp::validatorManifests_

Definition at line 193 of file Application.cpp.

◆ publisherManifests_

std::unique_ptr<ManifestCache> ripple::ApplicationImp::publisherManifests_

Definition at line 194 of file Application.cpp.

◆ validators_

std::unique_ptr<ValidatorList> ripple::ApplicationImp::validators_

Definition at line 195 of file Application.cpp.

◆ validatorSites_

std::unique_ptr<ValidatorSite> ripple::ApplicationImp::validatorSites_

Definition at line 196 of file Application.cpp.

◆ serverHandler_

std::unique_ptr<ServerHandler> ripple::ApplicationImp::serverHandler_

Definition at line 197 of file Application.cpp.

◆ m_amendmentTable

std::unique_ptr<AmendmentTable> ripple::ApplicationImp::m_amendmentTable

Definition at line 198 of file Application.cpp.

◆ mFeeTrack

std::unique_ptr<LoadFeeTrack> ripple::ApplicationImp::mFeeTrack

Definition at line 199 of file Application.cpp.

◆ hashRouter_

std::unique_ptr<HashRouter> ripple::ApplicationImp::hashRouter_

Definition at line 200 of file Application.cpp.

◆ mValidations

RCLValidations ripple::ApplicationImp::mValidations

Definition at line 201 of file Application.cpp.

◆ m_loadManager

std::unique_ptr<LoadManager> ripple::ApplicationImp::m_loadManager

Definition at line 202 of file Application.cpp.

◆ txQ_

std::unique_ptr<TxQ> ripple::ApplicationImp::txQ_

Definition at line 203 of file Application.cpp.

◆ waitHandlerCounter_

ClosureCounter<void, boost::system::error_code const&> ripple::ApplicationImp::waitHandlerCounter_

Definition at line 204 of file Application.cpp.

◆ sweepTimer_

boost::asio::steady_timer ripple::ApplicationImp::sweepTimer_

Definition at line 205 of file Application.cpp.

◆ entropyTimer_

boost::asio::steady_timer ripple::ApplicationImp::entropyTimer_

Definition at line 206 of file Application.cpp.

◆ startTimers_

bool ripple::ApplicationImp::startTimers_

Definition at line 207 of file Application.cpp.

◆ mTxnDB

std::unique_ptr<DatabaseCon> ripple::ApplicationImp::mTxnDB

Definition at line 209 of file Application.cpp.

◆ mLedgerDB

std::unique_ptr<DatabaseCon> ripple::ApplicationImp::mLedgerDB

Definition at line 210 of file Application.cpp.

◆ mWalletDB

std::unique_ptr<DatabaseCon> ripple::ApplicationImp::mWalletDB

Definition at line 211 of file Application.cpp.

◆ overlay_

std::unique_ptr<Overlay> ripple::ApplicationImp::overlay_

Definition at line 212 of file Application.cpp.

◆ websocketServers_

std::vector<std::unique_ptr<Stoppable> > ripple::ApplicationImp::websocketServers_

Definition at line 213 of file Application.cpp.

◆ m_signals

boost::asio::signal_set ripple::ApplicationImp::m_signals

Definition at line 215 of file Application.cpp.

◆ cv_

std::condition_variable ripple::ApplicationImp::cv_

Definition at line 217 of file Application.cpp.

◆ mut_

std::mutex ripple::ApplicationImp::mut_

Definition at line 218 of file Application.cpp.

◆ isTimeToStop

bool ripple::ApplicationImp::isTimeToStop = false

Definition at line 219 of file Application.cpp.

◆ checkSigs_

std::atomic<bool> ripple::ApplicationImp::checkSigs_

Definition at line 221 of file Application.cpp.

◆ m_resolver

std::unique_ptr<ResolverAsio> ripple::ApplicationImp::m_resolver

Definition at line 223 of file Application.cpp.

◆ m_io_latency_sampler

io_latency_sampler ripple::ApplicationImp::m_io_latency_sampler

Definition at line 225 of file Application.cpp.

◆ grpcServer_

std::unique_ptr<GRPCServer> ripple::ApplicationImp::grpcServer_

Definition at line 227 of file Application.cpp.

◆ maxDisallowedLedger_

std::atomic<LedgerIndex> ripple::ApplicationImp::maxDisallowedLedger_ {0}
private

Definition at line 1240 of file Application.cpp.

◆ m_name

const std::string beast::PropertyStream::Source::m_name
privateinherited

Definition at line 345 of file PropertyStream.h.

◆ lock_

std::recursive_mutex beast::PropertyStream::Source::lock_
privateinherited

Definition at line 346 of file PropertyStream.h.

◆ item_

Item beast::PropertyStream::Source::item_
privateinherited

Definition at line 347 of file PropertyStream.h.

◆ parent_

Source* beast::PropertyStream::Source::parent_
privateinherited

Definition at line 348 of file PropertyStream.h.

◆ children_

List<Item> beast::PropertyStream::Source::children_
privateinherited

Definition at line 349 of file PropertyStream.h.

◆ m_prepared

std::atomic<bool> ripple::RootStoppable::m_prepared {false}
privateinherited

Definition at line 425 of file Stoppable.h.

◆ m_started

std::atomic<bool> ripple::RootStoppable::m_started {false}
privateinherited

Definition at line 426 of file Stoppable.h.

◆ m_calledStop

std::atomic<bool> ripple::RootStoppable::m_calledStop {false}
privateinherited

Definition at line 427 of file Stoppable.h.

◆ m_

std::mutex ripple::RootStoppable::m_
privateinherited

Definition at line 428 of file Stoppable.h.

◆ c_

std::condition_variable ripple::RootStoppable::c_
privateinherited

Definition at line 429 of file Stoppable.h.

◆ jobCounter_

JobCounter ripple::RootStoppable::jobCounter_
privateinherited

Definition at line 430 of file Stoppable.h.

◆ m_root

RootStoppable& ripple::Stoppable::m_root
privateinherited

Definition at line 340 of file Stoppable.h.

◆ m_child

Child ripple::Stoppable::m_child
privateinherited

Definition at line 341 of file Stoppable.h.

◆ m_stopped

std::atomic<bool> ripple::Stoppable::m_stopped {false}
privateinherited

Definition at line 342 of file Stoppable.h.

◆ m_childrenStopped

std::atomic<bool> ripple::Stoppable::m_childrenStopped {false}
privateinherited

Definition at line 343 of file Stoppable.h.

◆ m_children

Children ripple::Stoppable::m_children
privateinherited

Definition at line 344 of file Stoppable.h.

◆ m_cv

std::condition_variable ripple::Stoppable::m_cv
privateinherited

Definition at line 345 of file Stoppable.h.

◆ m_mut

std::mutex ripple::Stoppable::m_mut
privateinherited

Definition at line 346 of file Stoppable.h.

◆ m_is_stopping

bool ripple::Stoppable::m_is_stopping = false
privateinherited

Definition at line 347 of file Stoppable.h.

◆ hasParent_

bool ripple::Stoppable::hasParent_ {false}
privateinherited

Definition at line 348 of file Stoppable.h.

◆ work_

boost::optional<boost::asio::io_service::work> BasicApp::work_
privateinherited

Definition at line 32 of file BasicApp.h.

◆ threads_

std::vector<std::thread> BasicApp::threads_
privateinherited

Definition at line 33 of file BasicApp.h.

◆ io_service_

boost::asio::io_service BasicApp::io_service_
privateinherited

Definition at line 34 of file BasicApp.h.