rippled
Loading...
Searching...
No Matches
LedgerCleaner.h
1#ifndef XRPL_APP_LEDGER_LEDGERCLEANER_H_INCLUDED
2#define XRPL_APP_LEDGER_LEDGERCLEANER_H_INCLUDED
3
4#include <xrpld/app/main/Application.h>
5
6#include <xrpl/beast/utility/Journal.h>
7#include <xrpl/beast/utility/PropertyStream.h>
8#include <xrpl/json/json_value.h>
9
10namespace ripple {
11
14{
15protected:
16 LedgerCleaner() : beast::PropertyStream::Source("ledgercleaner")
17 {
18 }
19
20public:
21 virtual ~LedgerCleaner() = default;
22
23 virtual void
24 start() = 0;
25
26 virtual void
27 stop() = 0;
28
39 virtual void
40 clean(Json::Value const& parameters) = 0;
41};
42
45
46} // namespace ripple
47
48#endif
Represents a JSON value.
Definition json_value.h:130
A generic endpoint for log messages.
Definition Journal.h:41
Subclasses can be called to write to a stream and have children.
Check the ledger/transaction databases to make sure they have continuity.
virtual ~LedgerCleaner()=default
virtual void clean(Json::Value const &parameters)=0
Start a long running task to clean the ledger.
virtual void start()=0
virtual void stop()=0
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
std::unique_ptr< LedgerCleaner > make_LedgerCleaner(Application &app, beast::Journal journal)