rippled
Public Member Functions | List of all members
ripple::SHAMapStore Class Referenceabstract

class to create database, launch online delete thread, and related SQLite database More...

Inheritance diagram for ripple::SHAMapStore:
Inheritance graph
[legend]

Public Member Functions

virtual ~SHAMapStore ()=default
 
virtual void onLedgerClosed (std::shared_ptr< Ledger const > const &ledger)=0
 Called by LedgerMaster every time a ledger validates. More...
 
virtual void start ()=0
 
virtual void rendezvous () const =0
 
virtual void stop ()=0
 
virtual std::uint32_t clampFetchDepth (std::uint32_t fetch_depth) const =0
 
virtual std::unique_ptr< NodeStore::DatabasemakeNodeStore (int readThreads)=0
 
virtual LedgerIndex setCanDelete (LedgerIndex canDelete)=0
 Highest ledger that may be deleted. More...
 
virtual bool advisoryDelete () const =0
 Whether advisory delete is enabled. More...
 
virtual LedgerIndex getLastRotated ()=0
 Maximum ledger that has been deleted, or will be deleted if currently in the act of online deletion. More...
 
virtual LedgerIndex getCanDelete ()=0
 Highest ledger that may be deleted. More...
 
virtual int fdRequired () const =0
 Returns the number of file descriptors that are needed. More...
 
virtual std::optional< LedgerIndexminimumOnline () const =0
 The minimum ledger to try and maintain in our database. More...
 

Detailed Description

class to create database, launch online delete thread, and related SQLite database

Definition at line 36 of file SHAMapStore.h.

Constructor & Destructor Documentation

◆ ~SHAMapStore()

virtual ripple::SHAMapStore::~SHAMapStore ( )
virtualdefault

Member Function Documentation

◆ onLedgerClosed()

virtual void ripple::SHAMapStore::onLedgerClosed ( std::shared_ptr< Ledger const > const &  ledger)
pure virtual

Called by LedgerMaster every time a ledger validates.

Implemented in ripple::SHAMapStoreImp.

◆ start()

virtual void ripple::SHAMapStore::start ( )
pure virtual

Implemented in ripple::SHAMapStoreImp.

◆ rendezvous()

virtual void ripple::SHAMapStore::rendezvous ( ) const
pure virtual

Implemented in ripple::SHAMapStoreImp.

◆ stop()

virtual void ripple::SHAMapStore::stop ( )
pure virtual

Implemented in ripple::SHAMapStoreImp.

◆ clampFetchDepth()

virtual std::uint32_t ripple::SHAMapStore::clampFetchDepth ( std::uint32_t  fetch_depth) const
pure virtual

Implemented in ripple::SHAMapStoreImp.

◆ makeNodeStore()

virtual std::unique_ptr<NodeStore::Database> ripple::SHAMapStore::makeNodeStore ( int  readThreads)
pure virtual

Implemented in ripple::SHAMapStoreImp.

◆ setCanDelete()

virtual LedgerIndex ripple::SHAMapStore::setCanDelete ( LedgerIndex  canDelete)
pure virtual

Highest ledger that may be deleted.

Implemented in ripple::SHAMapStoreImp.

◆ advisoryDelete()

virtual bool ripple::SHAMapStore::advisoryDelete ( ) const
pure virtual

Whether advisory delete is enabled.

Implemented in ripple::SHAMapStoreImp.

◆ getLastRotated()

virtual LedgerIndex ripple::SHAMapStore::getLastRotated ( )
pure virtual

Maximum ledger that has been deleted, or will be deleted if currently in the act of online deletion.

Implemented in ripple::SHAMapStoreImp.

◆ getCanDelete()

virtual LedgerIndex ripple::SHAMapStore::getCanDelete ( )
pure virtual

Highest ledger that may be deleted.

Implemented in ripple::SHAMapStoreImp.

◆ fdRequired()

virtual int ripple::SHAMapStore::fdRequired ( ) const
pure virtual

Returns the number of file descriptors that are needed.

Implemented in ripple::SHAMapStoreImp.

◆ minimumOnline()

virtual std::optional<LedgerIndex> ripple::SHAMapStore::minimumOnline ( ) const
pure virtual

The minimum ledger to try and maintain in our database.

This defines the lower bound for attempting to acquire historical ledgers over the peer to peer network.

If online_delete is enabled, then each time online_delete executes and just prior to clearing SQL databases of historical ledgers, move the value forward to one past the greatest ledger being deleted. This minimizes fetching of ledgers that are in the process of being deleted. Without online_delete or before online_delete is executed, this value is always the minimum value persisted in the ledger database, if any.

Returns
The minimum ledger sequence to keep online based on the description above. If not set, then an unseated optional.

Implemented in ripple::SHAMapStoreImp.