20 #include <ripple/nodestore/impl/BatchWriter.h>
26 : m_callback(callback)
27 , m_scheduler(scheduler)
29 , mWritePending(false)
105 report.
elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
void performScheduledTask() override
Performs the task.
CondvarType mWriteCondition
@ batchWritePreallocationSize
virtual void scheduleTask(Task &task)=0
Schedules a task.
virtual void writeBatch(Batch const &batch)=0
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,...
This callback does the actual writing.
Scheduling for asynchronous backend activity.
~BatchWriter()
Destroy a batch writer.
Contains information about a batch write operation.
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
int getWriteLoad()
Get an estimate of the amount of writing I/O pending.
BatchWriter(Callback &callback, Scheduler &scheduler)
Create a batch writer.
void store(std::shared_ptr< NodeObject > const &object)
Store the object.
std::chrono::milliseconds elapsed
virtual void onBatchWrite(BatchWriteReport const &report)=0
Reports the completion of a batch write Allows the scheduler to monitor the node store's performance.