2016-12-14 05:11:05 +03:00
|
|
|
/*
|
2019-06-20 02:58:25 +03:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2016-12-14 05:11:05 +03:00
|
|
|
*
|
2019-06-20 02:58:25 +03:00
|
|
|
* This software may be used and distributed according to the terms of the
|
|
|
|
* GNU General Public License version 2.
|
2016-12-14 05:11:05 +03:00
|
|
|
*/
|
2019-10-11 15:26:59 +03:00
|
|
|
|
2016-12-14 05:11:05 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "BackingStore.h"
|
2020-06-23 19:52:08 +03:00
|
|
|
#include "eden/fs/store/ObjectFetchContext.h"
|
2016-12-14 05:11:05 +03:00
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace eden {
|
|
|
|
|
|
|
|
/*
|
|
|
|
* A dummy BackingStore implementation, that always throws std::domain_error
|
|
|
|
* for any ID that is looked up.
|
|
|
|
*/
|
|
|
|
class EmptyBackingStore : public BackingStore {
|
|
|
|
public:
|
|
|
|
EmptyBackingStore();
|
2017-05-24 02:08:03 +03:00
|
|
|
~EmptyBackingStore() override;
|
2016-12-14 05:11:05 +03:00
|
|
|
|
2020-03-17 12:29:57 +03:00
|
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTree(
|
|
|
|
const Hash& id,
|
2020-07-24 18:21:52 +03:00
|
|
|
ObjectFetchContext& context) override;
|
2020-03-17 12:29:57 +03:00
|
|
|
folly::SemiFuture<std::unique_ptr<Blob>> getBlob(
|
|
|
|
const Hash& id,
|
2020-07-24 18:21:52 +03:00
|
|
|
ObjectFetchContext& context) override;
|
2019-12-19 03:14:07 +03:00
|
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForCommit(
|
2020-11-12 03:25:37 +03:00
|
|
|
const Hash& commitID,
|
|
|
|
ObjectFetchContext& context) override;
|
2019-12-19 03:14:07 +03:00
|
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForManifest(
|
2019-12-10 03:23:34 +03:00
|
|
|
const Hash& commitID,
|
2020-11-12 03:25:37 +03:00
|
|
|
const Hash& manifestID,
|
|
|
|
ObjectFetchContext& context) override;
|
2016-12-14 05:11:05 +03:00
|
|
|
};
|
2017-11-04 01:58:04 +03:00
|
|
|
} // namespace eden
|
|
|
|
} // namespace facebook
|