aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/docstore/randread.h
blob: dee229114d1c63a201865990da1009763a0ac719 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <cstddef>
#include <cstdint>
#include <memory>

class FastOS_FileInterface;

namespace vespalib { class DataBuffer; }

namespace search {

class FileRandRead
{
public:
    using FSP = std::shared_ptr<FastOS_FileInterface>;
    virtual ~FileRandRead() = default;
    virtual FSP read(size_t offset, vespalib::DataBuffer & buffer, size_t sz) = 0;
    virtual int64_t getSize() const = 0;
};

}