xrpld
Loading...
Searching...
No Matches
xrpl::Application Class Referenceabstract

#include <Application.h>

Inheritance diagram for xrpl::Application:
Collaboration diagram for xrpl::Application:

Public Types

using MutexType = std::recursive_mutex

Public Member Functions

virtual MutexTypegetMasterMutex ()=0
 Application ()
virtual bool setup (boost::program_options::variables_map const &options)=0
virtual void start (bool withTimers)=0
virtual void run ()=0
virtual void signalStop (std::string const &msg)=0
virtual bool checkSigs () const =0
virtual void checkSigs (bool)=0
virtual std::uint64_t instanceID () const =0
 Returns a 64-bit instance identifier, generated at startup.
virtual Configconfig ()=0
virtual std::pair< PublicKey, SecretKey > const & nodeIdentity ()=0
virtual std::optional< PublicKey const > getValidationPublicKey () const =0
virtual std::chrono::milliseconds getIOLatency ()=0
virtual bool serverOkay (std::string &reason)=0
virtual int fdRequired () const =0
virtual LedgerIndex getMaxDisallowedLedger ()=0
 Ensure that a newly-started validator does not sign proposals older than the last ledger it persisted.
virtual size_t getNumberOfThreads () const =0
 Returns the number of io_context (I/O worker) threads used by the application.
virtual CollectorManagergetCollectorManager ()=0
virtual FamilygetNodeFamily ()=0
virtual TimeKeepergetTimeKeeper ()=0
virtual JobQueuegetJobQueue ()=0
virtual NodeCachegetTempNodeCache ()=0
virtual CachedSLEsgetCachedSLEs ()=0
virtual NetworkIDServicegetNetworkIDService ()=0
virtual AmendmentTablegetAmendmentTable ()=0
virtual HashRoutergetHashRouter ()=0
virtual LoadFeeTrackgetFeeTrack ()=0
virtual LoadManagergetLoadManager ()=0
virtual RCLValidationsgetValidations ()=0
virtual ValidatorListgetValidators ()=0
virtual ValidatorSitegetValidatorSites ()=0
virtual ManifestCachegetValidatorManifests ()=0
virtual ManifestCachegetPublisherManifests ()=0
virtual OverlaygetOverlay ()=0
virtual ClustergetCluster ()=0
virtual PeerReservationTablegetPeerReservations ()=0
virtual Resource::ManagergetResourceManager ()=0
virtual NodeStore::DatabasegetNodeStore ()=0
virtual SHAMapStoregetSHAMapStore ()=0
virtual RelationalDatabasegetRelationalDatabase ()=0
virtual InboundLedgersgetInboundLedgers ()=0
virtual InboundTransactionsgetInboundTransactions ()=0
virtual TaggedCache< uint256, AcceptedLedger > & getAcceptedLedgerCache ()=0
virtual LedgerMastergetLedgerMaster ()=0
virtual LedgerCleanergetLedgerCleaner ()=0
virtual LedgerReplayergetLedgerReplayer ()=0
virtual PendingSavesgetPendingSaves ()=0
virtual OpenLedgergetOpenLedger ()=0
virtual OpenLedger const & getOpenLedger () const =0
virtual NetworkOPsgetOPs ()=0
virtual OrderBookDBgetOrderBookDB ()=0
virtual TransactionMastergetMasterTransaction ()=0
virtual TxQgetTxQ ()=0
virtual PathRequestManagergetPathRequestManager ()=0
virtual ServerHandlergetServerHandler ()=0
virtual perf::PerfLoggetPerfLog ()=0
virtual bool isStopping () const =0
virtual beast::Journal getJournal (std::string const &name)=0
virtual boost::asio::io_context & getIOContext ()=0
virtual LogsgetLogs ()=0
virtual std::optional< uint256 > const & getTrapTxID () const =0
virtual DatabaseCongetWalletDB ()=0
 Retrieve the "wallet database".
virtual ApplicationgetApp ()=0
std::string const & name () const
 Returns the name of this source.
void add (Source &source)
 Add a child source.
template<class Derived>
Derived * add (Derived *child)
 Add a child source by pointer.
void remove (Source &child)
 Remove a child source from this Source.
void removeAll ()
 Remove all child sources from this Source.
void writeOne (PropertyStream &stream)
 Write only this Source to the stream.
void write (PropertyStream &stream)
 write this source and all its children recursively to the stream.
void write (PropertyStream &stream, std::string const &path)
 Parse the path and write the corresponding Source and optional children.
std::pair< Source *, bool > find (std::string path)
 Parse the dot-delimited Source path and return the result.
SourcefindOneDeep (std::string const &name)
PropertyStream::Source * findPath (std::string path)
PropertyStream::Source * findOne (std::string const &name)
virtual void onWrite (Map &)
 Subclass override.

Static Public Member Functions

static bool peelLeadingSlash (std::string *path)
static bool peelTrailingSlashstar (std::string *path)
static std::string peelName (std::string *path)

Private Attributes

std::string const name_
std::recursive_mutex lock_
Item item_
Sourceparent_ {nullptr}
List< Item > children_

Detailed Description

Definition at line 85 of file Application.h.

Member Typedef Documentation

◆ MutexType

Constructor & Destructor Documentation

◆ Application()

xrpl::Application::Application ( )

Definition at line 2152 of file Application.cpp.

Member Function Documentation

◆ getMasterMutex()

virtual MutexType & xrpl::Application::getMasterMutex ( )
pure virtual

Implemented in xrpl::ApplicationImp.

◆ setup()

virtual bool xrpl::Application::setup ( boost::program_options::variables_map const & options)
pure virtual

Implemented in xrpl::ApplicationImp.

◆ start()

virtual void xrpl::Application::start ( bool withTimers)
pure virtual

Implemented in xrpl::ApplicationImp.

◆ run()

virtual void xrpl::Application::run ( )
pure virtual

Implemented in xrpl::ApplicationImp.

◆ signalStop()

virtual void xrpl::Application::signalStop ( std::string const & msg)
pure virtual

Implemented in xrpl::ApplicationImp.

◆ checkSigs() [1/2]

virtual bool xrpl::Application::checkSigs ( ) const
nodiscardpure virtual

Implemented in xrpl::ApplicationImp.

◆ checkSigs() [2/2]

virtual void xrpl::Application::checkSigs ( bool )
pure virtual

Implemented in xrpl::ApplicationImp.

◆ instanceID()

virtual std::uint64_t xrpl::Application::instanceID ( ) const
nodiscardpure virtual

Returns a 64-bit instance identifier, generated at startup.

Implemented in xrpl::ApplicationImp.

◆ config()

virtual Config & xrpl::Application::config ( )
pure virtual

Implemented in xrpl::ApplicationImp.

◆ nodeIdentity()

virtual std::pair< PublicKey, SecretKey > const & xrpl::Application::nodeIdentity ( )
pure virtual

Implemented in xrpl::ApplicationImp.

◆ getValidationPublicKey()

virtual std::optional< PublicKey const > xrpl::Application::getValidationPublicKey ( ) const
nodiscardpure virtual

Implemented in xrpl::ApplicationImp.

◆ getIOLatency()

virtual std::chrono::milliseconds xrpl::Application::getIOLatency ( )
pure virtual

Implemented in xrpl::ApplicationImp.

◆ serverOkay()

virtual bool xrpl::Application::serverOkay ( std::string & reason)
pure virtual

Implemented in xrpl::ApplicationImp.

◆ fdRequired()

virtual int xrpl::Application::fdRequired ( ) const
nodiscardpure virtual

Implemented in xrpl::ApplicationImp.

◆ getMaxDisallowedLedger()

virtual LedgerIndex xrpl::Application::getMaxDisallowedLedger ( )
pure virtual

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

Implemented in xrpl::ApplicationImp.

◆ getNumberOfThreads()

virtual size_t xrpl::Application::getNumberOfThreads ( ) const
nodiscardpure virtual

Returns the number of io_context (I/O worker) threads used by the application.

Implemented in xrpl::ApplicationImp.

◆ getCollectorManager()

virtual CollectorManager & xrpl::ServiceRegistry::getCollectorManager ( )
pure virtualinherited

◆ getNodeFamily()

virtual Family & xrpl::ServiceRegistry::getNodeFamily ( )
pure virtualinherited

◆ getTimeKeeper()

virtual TimeKeeper & xrpl::ServiceRegistry::getTimeKeeper ( )
pure virtualinherited

◆ getJobQueue()

virtual JobQueue & xrpl::ServiceRegistry::getJobQueue ( )
pure virtualinherited

◆ getTempNodeCache()

virtual NodeCache & xrpl::ServiceRegistry::getTempNodeCache ( )
pure virtualinherited

◆ getCachedSLEs()

virtual CachedSLEs & xrpl::ServiceRegistry::getCachedSLEs ( )
pure virtualinherited

◆ getNetworkIDService()

virtual NetworkIDService & xrpl::ServiceRegistry::getNetworkIDService ( )
pure virtualinherited

◆ getAmendmentTable()

virtual AmendmentTable & xrpl::ServiceRegistry::getAmendmentTable ( )
pure virtualinherited

◆ getHashRouter()

virtual HashRouter & xrpl::ServiceRegistry::getHashRouter ( )
pure virtualinherited

◆ getFeeTrack()

virtual LoadFeeTrack & xrpl::ServiceRegistry::getFeeTrack ( )
pure virtualinherited

◆ getLoadManager()

virtual LoadManager & xrpl::ServiceRegistry::getLoadManager ( )
pure virtualinherited

◆ getValidations()

virtual RCLValidations & xrpl::ServiceRegistry::getValidations ( )
pure virtualinherited

◆ getValidators()

virtual ValidatorList & xrpl::ServiceRegistry::getValidators ( )
pure virtualinherited

◆ getValidatorSites()

virtual ValidatorSite & xrpl::ServiceRegistry::getValidatorSites ( )
pure virtualinherited

◆ getValidatorManifests()

virtual ManifestCache & xrpl::ServiceRegistry::getValidatorManifests ( )
pure virtualinherited

◆ getPublisherManifests()

virtual ManifestCache & xrpl::ServiceRegistry::getPublisherManifests ( )
pure virtualinherited

◆ getOverlay()

virtual Overlay & xrpl::ServiceRegistry::getOverlay ( )
pure virtualinherited

◆ getCluster()

virtual Cluster & xrpl::ServiceRegistry::getCluster ( )
pure virtualinherited

◆ getPeerReservations()

virtual PeerReservationTable & xrpl::ServiceRegistry::getPeerReservations ( )
pure virtualinherited

◆ getResourceManager()

virtual Resource::Manager & xrpl::ServiceRegistry::getResourceManager ( )
pure virtualinherited

◆ getNodeStore()

virtual NodeStore::Database & xrpl::ServiceRegistry::getNodeStore ( )
pure virtualinherited

◆ getSHAMapStore()

virtual SHAMapStore & xrpl::ServiceRegistry::getSHAMapStore ( )
pure virtualinherited

◆ getRelationalDatabase()

virtual RelationalDatabase & xrpl::ServiceRegistry::getRelationalDatabase ( )
pure virtualinherited

◆ getInboundLedgers()

virtual InboundLedgers & xrpl::ServiceRegistry::getInboundLedgers ( )
pure virtualinherited

◆ getInboundTransactions()

virtual InboundTransactions & xrpl::ServiceRegistry::getInboundTransactions ( )
pure virtualinherited

◆ getAcceptedLedgerCache()

virtual TaggedCache< uint256, AcceptedLedger > & xrpl::ServiceRegistry::getAcceptedLedgerCache ( )
pure virtualinherited

◆ getLedgerMaster()

virtual LedgerMaster & xrpl::ServiceRegistry::getLedgerMaster ( )
pure virtualinherited

◆ getLedgerCleaner()

virtual LedgerCleaner & xrpl::ServiceRegistry::getLedgerCleaner ( )
pure virtualinherited

◆ getLedgerReplayer()

virtual LedgerReplayer & xrpl::ServiceRegistry::getLedgerReplayer ( )
pure virtualinherited

◆ getPendingSaves()

virtual PendingSaves & xrpl::ServiceRegistry::getPendingSaves ( )
pure virtualinherited

◆ getOpenLedger() [1/2]

virtual OpenLedger & xrpl::ServiceRegistry::getOpenLedger ( )
pure virtualinherited

◆ getOpenLedger() [2/2]

virtual OpenLedger const & xrpl::ServiceRegistry::getOpenLedger ( ) const
nodiscardpure virtualinherited

◆ getOPs()

virtual NetworkOPs & xrpl::ServiceRegistry::getOPs ( )
pure virtualinherited

◆ getOrderBookDB()

virtual OrderBookDB & xrpl::ServiceRegistry::getOrderBookDB ( )
pure virtualinherited

◆ getMasterTransaction()

virtual TransactionMaster & xrpl::ServiceRegistry::getMasterTransaction ( )
pure virtualinherited

◆ getTxQ()

virtual TxQ & xrpl::ServiceRegistry::getTxQ ( )
pure virtualinherited

◆ getPathRequestManager()

virtual PathRequestManager & xrpl::ServiceRegistry::getPathRequestManager ( )
pure virtualinherited

◆ getServerHandler()

virtual ServerHandler & xrpl::ServiceRegistry::getServerHandler ( )
pure virtualinherited

◆ getPerfLog()

virtual perf::PerfLog & xrpl::ServiceRegistry::getPerfLog ( )
pure virtualinherited

◆ isStopping()

virtual bool xrpl::ServiceRegistry::isStopping ( ) const
nodiscardpure virtualinherited

◆ getJournal()

virtual beast::Journal xrpl::ServiceRegistry::getJournal ( std::string const & name)
pure virtualinherited

◆ getIOContext()

virtual boost::asio::io_context & xrpl::ServiceRegistry::getIOContext ( )
pure virtualinherited

◆ getLogs()

virtual Logs & xrpl::ServiceRegistry::getLogs ( )
pure virtualinherited

◆ getTrapTxID()

virtual std::optional< uint256 > const & xrpl::ServiceRegistry::getTrapTxID ( ) const
nodiscardpure virtualinherited

◆ getWalletDB()

virtual DatabaseCon & xrpl::ServiceRegistry::getWalletDB ( )
pure virtualinherited

Retrieve the "wallet database".

Implemented in xrpl::ApplicationImp, and xrpl::test::TestServiceRegistry.

◆ getApp()

virtual Application & xrpl::ServiceRegistry::getApp ( )
pure virtualinherited

◆ name()

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

Returns the name of this source.

Definition at line 168 of file beast_PropertyStream.cpp.

◆ add() [1/2]

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

Add a child source.

Definition at line 174 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 338 of file PropertyStream.h.

◆ remove()

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

Remove a child source from this Source.

Definition at line 185 of file beast_PropertyStream.cpp.

◆ removeAll()

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

Remove all child sources from this Source.

Definition at line 196 of file beast_PropertyStream.cpp.

◆ writeOne()

void beast::PropertyStream::Source::writeOne ( PropertyStream & stream)
inherited

Write only this Source to the stream.

Definition at line 209 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 216 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 228 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 descendent "parent.grandchild." starts at the parent and prints down to grandchild "parent.grandchild.*" starts at parent, print through grandchild children

Definition at line 246 of file beast_PropertyStream.cpp.

◆ findOneDeep()

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

Definition at line 317 of file beast_PropertyStream.cpp.

◆ findPath()

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

Definition at line 334 of file beast_PropertyStream.cpp.

◆ findOne()

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

Definition at line 352 of file beast_PropertyStream.cpp.

◆ peelLeadingSlash()

bool beast::PropertyStream::Source::peelLeadingSlash ( std::string * path)
staticinherited

Definition at line 266 of file beast_PropertyStream.cpp.

◆ peelTrailingSlashstar()

bool beast::PropertyStream::Source::peelTrailingSlashstar ( std::string * path)
staticinherited

Definition at line 277 of file beast_PropertyStream.cpp.

◆ peelName()

std::string beast::PropertyStream::Source::peelName ( std::string * path)
staticinherited

Definition at line 293 of file beast_PropertyStream.cpp.

◆ onWrite()

void beast::PropertyStream::Source::onWrite ( Map & )
virtualinherited

Subclass override.

The default version does nothing.

Reimplemented in xrpl::ApplicationImp, xrpl::LedgerCleanerImp, xrpl::OverlayImpl, xrpl::PeerFinder::ManagerImp, and xrpl::Resource::ManagerImp.

Definition at line 364 of file beast_PropertyStream.cpp.

Member Data Documentation

◆ name_

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

Definition at line 311 of file PropertyStream.h.

◆ lock_

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

Definition at line 312 of file PropertyStream.h.

◆ item_

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

Definition at line 313 of file PropertyStream.h.

◆ parent_

Source* beast::PropertyStream::Source::parent_ {nullptr}
privateinherited

Definition at line 314 of file PropertyStream.h.

◆ children_

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

Definition at line 315 of file PropertyStream.h.