mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
a5761ba12c
Summary: Thanks Katie for this idea I think with this my project should at least not blocked by buck circular dependency Reviewed By: kmancini Differential Revision: D50041643 fbshipit-source-id: 7f75be6ba6d9e518c7f29273efe67f98186c45f3
59 lines
1.9 KiB
C++
59 lines
1.9 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This software may be used and distributed according to the terms of the
|
|
* GNU General Public License version 2.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "eden/fs/model/RootId.h"
|
|
#include "eden/fs/store/BackingStore.h"
|
|
#include "eden/fs/store/ObjectFetchContext.h"
|
|
|
|
namespace facebook::eden {
|
|
|
|
/*
|
|
* A dummy BackingStore implementation, that always throws std::domain_error
|
|
* for any ID that is looked up.
|
|
*/
|
|
class EmptyBackingStore final : public BijectiveBackingStore {
|
|
public:
|
|
EmptyBackingStore();
|
|
~EmptyBackingStore() override;
|
|
|
|
RootId parseRootId(folly::StringPiece rootId) override;
|
|
std::string renderRootId(const RootId& rootId) override;
|
|
ObjectId parseObjectId(folly::StringPiece objectId) override;
|
|
std::string renderObjectId(const ObjectId& objectId) override;
|
|
|
|
ImmediateFuture<GetRootTreeResult> getRootTree(
|
|
const RootId& rootId,
|
|
const ObjectFetchContextPtr& context) override;
|
|
ImmediateFuture<std::shared_ptr<TreeEntry>> getTreeEntryForObjectId(
|
|
const ObjectId& /* objectId */,
|
|
TreeEntryType /* treeEntryType */,
|
|
const ObjectFetchContextPtr& /* context */) override {
|
|
throw std::domain_error("unimplemented");
|
|
}
|
|
folly::SemiFuture<GetTreeResult> getTree(
|
|
const ObjectId& id,
|
|
const ObjectFetchContextPtr& context) override;
|
|
folly::SemiFuture<GetBlobResult> getBlob(
|
|
const ObjectId& id,
|
|
const ObjectFetchContextPtr& context) override;
|
|
folly::SemiFuture<GetBlobMetaResult> getBlobMetadata(
|
|
const ObjectId& /*id*/,
|
|
const ObjectFetchContextPtr& /*context*/) override;
|
|
|
|
// TODO(T119221752): Implement for all BackingStore subclasses
|
|
int64_t dropAllPendingRequestsFromQueue() override {
|
|
XLOG(
|
|
WARN,
|
|
"dropAllPendingRequestsFromQueue() is not implemented for ReCasBackingStores");
|
|
return 0;
|
|
}
|
|
};
|
|
|
|
} // namespace facebook::eden
|