3#include <xrpl/nodestore/Scheduler.h>
4#include <xrpl/nodestore/Task.h>
5#include <xrpl/nodestore/Types.h>
void store(std::shared_ptr< NodeObject > const &object)
Store the object.
void performScheduledTask() override
Performs the task.
std::condition_variable_any CondvarType
~BatchWriter() override
Destroy a batch writer.
std::recursive_mutex LockType
CondvarType writeCondition_
int getWriteLoad()
Get an estimate of the amount of writing I/O pending.
BatchWriter(Callback &callback, Scheduler &scheduler)
Create a batch writer.
Scheduling for asynchronous backend activity.
std::vector< std::shared_ptr< NodeObject > > Batch
A batch of NodeObjects to write at once.
This callback does the actual writing.
virtual ~Callback()=default
Callback & operator=(Callback const &)=delete
virtual void writeBatch(Batch const &batch)=0
Callback(Callback const &)=delete
Derived classes perform scheduled tasks.