sapling/eden/fs/store/EmptyBackingStore.h
Zeyi (Rice) Fan 2da686d315 add priority to BackingStore interface
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
2020-03-17 02:31:23 -07:00

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