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"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
folly::Future<std::unique_ptr<Tree>> getTree(const Hash& id) override;
|
|
|
|
folly::Future<std::unique_ptr<Blob>> getBlob(const Hash& id) override;
|
|
|
|
folly::Future<std::unique_ptr<Tree>> getTreeForCommit(
|
|
|
|
const Hash& commitID) override;
|
|
|
|
};
|
2017-11-04 01:58:04 +03:00
|
|
|
} // namespace eden
|
|
|
|
} // namespace facebook
|