13 #include "logdevice/include/Record.h" 14 #include "logdevice/include/types.h" 18 struct ReadStreamAttributes;
20 enum class HealthChangeType {
58 setRecordCallback(std::function<
bool(std::unique_ptr<DataRecord>&)>) = 0;
72 virtual void setGapCallback(std::function<
bool(
const GapRecord&)>) = 0;
78 virtual void setDoneCallback(std::function<
void(logid_t)>) = 0;
89 setHealthChangeCallback(std::function<
void(logid_t, HealthChangeType)>) = 0;
145 virtual int startReading(logid_t log_id,
147 lsn_t until = LSN_MAX,
148 const ReadStreamAttributes* attrs =
nullptr) = 0;
171 virtual int stopReading(logid_t log_id,
172 std::function<
void()> callback =
nullptr) = 0;
192 virtual int resumeReading(logid_t log_id) = 0;
201 virtual void addMonitoringTag(std::string tag) = 0;
211 virtual void withoutPayload() = 0;
222 virtual void forceNoSingleCopyDelivery() = 0;
234 virtual void includeByteOffset() = 0;
248 virtual void doNotSkipPartiallyTrimmedSections() = 0;
263 virtual int isConnectionHealthy(logid_t)
const = 0;
274 virtual void doNotDecodeBufferedWrites() = 0;
296 static lsn_t nextFromLsnWhenStuck(lsn_t stuck_lsn = LSN_INVALID,
297 lsn_t tail_lsn = LSN_INVALID);
303 virtual void getBytesBuffered(std::function<
void(
size_t)> callback) = 0;
305 virtual void setReaderName(
const std::string& reader_name) = 0;
Definition: AsyncReader.h:16
Definition: AsyncReader.h:40