mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
2da686d315
Summary: This diff adds `Priority` added in the previous diff to the `BackingStore` interface with the default value set to `Priority::Normal`. Reviewed By: chadaustin Differential Revision: D20197071 fbshipit-source-id: a92f1b49bb82e3478042e5e3b79b047d834755ea
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#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();
|
|
~EmptyBackingStore() override;
|
|
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTree(
|
|
const Hash& id,
|
|
ImportPriority priority = ImportPriority::kNormal) override;
|
|
folly::SemiFuture<std::unique_ptr<Blob>> getBlob(
|
|
const Hash& id,
|
|
ImportPriority priority = ImportPriority::kNormal) override;
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForCommit(
|
|
const Hash& commitID) override;
|
|
folly::SemiFuture<std::unique_ptr<Tree>> getTreeForManifest(
|
|
const Hash& commitID,
|
|
const Hash& manifestID) override;
|
|
};
|
|
} // namespace eden
|
|
} // namespace facebook
|