sapling/eden/fs/store/EmptyBackingStore.cpp
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

54 lines
1.4 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.
*/
#include "eden/fs/store/EmptyBackingStore.h"
#include <folly/futures/Future.h>
#include "eden/fs/model/Blob.h"
#include "eden/fs/model/Hash.h"
#include "eden/fs/model/Tree.h"
using folly::makeSemiFuture;
using folly::SemiFuture;
using std::unique_ptr;
namespace facebook {
namespace eden {
EmptyBackingStore::EmptyBackingStore() {}
EmptyBackingStore::~EmptyBackingStore() {}
SemiFuture<unique_ptr<Tree>> EmptyBackingStore::getTree(
const Hash& /* id */,
ImportPriority /* priority */) {
return makeSemiFuture<unique_ptr<Tree>>(
std::domain_error("empty backing store"));
}
SemiFuture<unique_ptr<Blob>> EmptyBackingStore::getBlob(
const Hash& /* id */,
ImportPriority /* priority */) {
return makeSemiFuture<unique_ptr<Blob>>(
std::domain_error("empty backing store"));
}
SemiFuture<unique_ptr<Tree>> EmptyBackingStore::getTreeForCommit(
const Hash& /* commitID */) {
return makeSemiFuture<unique_ptr<Tree>>(
std::domain_error("empty backing store"));
}
SemiFuture<std::unique_ptr<Tree>> EmptyBackingStore::getTreeForManifest(
const Hash& /* commitID */,
const Hash& /* manifestID */) {
return makeSemiFuture<unique_ptr<Tree>>(
std::domain_error("empty backing store"));
}
} // namespace eden
} // namespace facebook