1 | #pragma once |
2 | |
3 | #include <IO/ReadBufferFromFileBase.h> |
4 | #include <string> |
5 | #include <memory> |
6 | |
7 | |
8 | namespace DB |
9 | { |
10 | |
11 | /** Create an object to read data from a file. |
12 | * estimated_size - the number of bytes to read |
13 | * aio_threshold - the minimum number of bytes for asynchronous reads |
14 | * |
15 | * If aio_threshold = 0 or estimated_size < aio_threshold, read operations are executed synchronously. |
16 | * Otherwise, the read operations are performed asynchronously. |
17 | */ |
18 | std::unique_ptr<ReadBufferFromFileBase> createReadBufferFromFileBase( |
19 | const std::string & filename_, |
20 | size_t estimated_size, |
21 | size_t aio_threshold, |
22 | size_t buffer_size_ = DBMS_DEFAULT_BUFFER_SIZE, |
23 | int flags_ = -1, |
24 | char * existing_memory_ = nullptr, |
25 | size_t alignment = 0); |
26 | |
27 | } |
28 | |