1#include <xrpl/nodestore/detail/BatchWriter.h>
7 : m_callback(callback), m_scheduler(scheduler), mWriteLoad(0), mWritePending(false)
64 XRPL_ASSERT(
mWriteSet.
empty(),
"xrpl::NodeStore::BatchWriter::writeBatch : writes not set");
void store(std::shared_ptr< NodeObject > const &object)
Store the object.
void performScheduledTask() override
Performs the task.
~BatchWriter()
Destroy a batch writer.
CondvarType mWriteCondition
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.
virtual void scheduleTask(Task &task)=0
Schedules a task.
virtual void onBatchWrite(BatchWriteReport const &report)=0
Reports the completion of a batch write Allows the scheduler to monitor the node store's performance.
@ batchWritePreallocationSize
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
bool set(T &target, std::string const &name, Section const §ion)
Set a value from a configuration Section If the named value is not found or doesn't parse as a T,...
Contains information about a batch write operation.
std::chrono::milliseconds elapsed
This callback does the actual writing.
virtual void writeBatch(Batch const &batch)=0