14 #include <folly/Range.h> 16 #include "logdevice/include/Record.h" 17 #include "logdevice/include/types.h" 19 namespace facebook {
namespace logdevice {
21 struct ReadStreamAttributes;
56 lsn_t until = LSN_MAX,
57 const ReadStreamAttributes* attrs =
nullptr) = 0;
75 virtual bool isReading(logid_t log_id)
const = 0;
95 virtual int setTimeout(std::chrono::milliseconds timeout) = 0;
97 const std::chrono::milliseconds MAX_TIMEOUT{(1LL << 31) - 1};
146 virtual ssize_t
read(
size_t nrecords,
147 std::vector<std::unique_ptr<DataRecord>>* data_out,
148 GapRecord* gap_out) = 0;
248 virtual void setReaderName(
const std::string&) = 0;
271 lsn_t tail_lsn = LSN_INVALID);
virtual void withoutPayload()=0
virtual int startReading(logid_t log_id, lsn_t from, lsn_t until=LSN_MAX, const ReadStreamAttributes *attrs=nullptr)=0
virtual bool isReading(logid_t log_id) const =0
virtual void doNotDecodeBufferedWrites()=0
virtual int stopReading(logid_t log_id)=0
virtual void doNotSkipPartiallyTrimmedSections()=0
Definition: AsyncReader.h:16
virtual ssize_t read(size_t nrecords, std::vector< std::unique_ptr< DataRecord >> *data_out, GapRecord *gap_out)=0
static lsn_t nextFromLsnWhenStuck(lsn_t stuck_lsn=LSN_INVALID, lsn_t tail_lsn=LSN_INVALID)
virtual void includeByteOffset()=0
virtual int setTimeout(std::chrono::milliseconds timeout)=0
virtual ~Reader()
Definition: Reader.h:279
virtual bool isReadingAny() const =0
virtual int isConnectionHealthy(logid_t) const =0
virtual void forceNoSingleCopyDelivery()=0
virtual void addMonitoringTag(std::string tag)=0
virtual void waitOnlyWhenNoData()=0