ClickHouse/src/IO/SeekAvoidingReadBuffer.h

27 lines
499 B
C++
Raw Normal View History

2020-07-13 00:24:49 +00:00
#pragma once
#include <IO/ReadBufferFromFileBase.h>
namespace DB
{
class SeekAvoidingReadBuffer : public ReadBufferFromFileBase
{
std::unique_ptr<ReadBufferFromFileBase> nested;
UInt64 min_bytes_for_seek;
public:
SeekAvoidingReadBuffer(std::unique_ptr<ReadBufferFromFileBase> nested_, UInt64 min_bytes_for_seek_);
std::string getFileName() const override;
off_t getPosition() override;
off_t seek(off_t off, int whence) override;
bool nextImpl() override;
};
}