19#include "WriteFileHandler.h"
39 virtual void newChunk(
const string& path,
size_t index,
bool isLastChunk) = 0;
50 : chunkHandler_{chunkHandler.get()} {
51 if (chunkHandler_ !=
nullptr) {
55 void notify(
size_t indexOffset = 0,
bool isLastChunk =
false) {
56 if (chunkHandler_ !=
nullptr) {
57 chunkHandler_->
newChunk(path_, index_ + indexOffset, isLastChunk);
Listener to be notified when a new file chunk is finalized.
Definition NewChunkHandler.h:27
virtual void newChunk(const string &path, size_t index, bool isLastChunk)=0
Helper to make new chunks notifications simpler and safer.
Definition NewChunkHandler.h:47
The WriteFileHandler interface adds write operations to the FileHandler interface.
Definition WriteFileHandler.h:45
virtual bool getCurrentChunk(string &outChunkPath, size_t &outChunkIndex) const =0
Get the path of the current chunk, or an empty string if no chunk is open.
Definition AsyncDiskFileChunk.hpp:49