aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Storages/Cache/IRemoteFileMetadata.h
blob: 1d152fcdd151360b55215b6feb6a1e0ca2b372cd (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
25
26
27
28
29
30
#pragma once
#include <functional>
#include <memory>
#include <unordered_map>
#include <base/types.h>
#include <boost/core/noncopyable.hpp>

namespace DB
{
class IRemoteFileMetadata
{
public:
    virtual ~IRemoteFileMetadata() = default;
    virtual String getName() const = 0; //class name

    // deserialize
    virtual bool fromString(const String & buf) = 0;
    // serialize
    virtual String toString() const = 0;

    // Used for comparing two file metadatas are the same or not.
    virtual String getVersion() const = 0;

    String remote_path;
    size_t file_size = 0;
    UInt64 last_modification_timestamp = 0;
};

using IRemoteFileMetadataPtr = std::shared_ptr<IRemoteFileMetadata>;
}