mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
b75b10bc33
Summary: The last remaining user of ObjectStore::getBlobMetadata was a debug Thrift call. Remove it and update the Thrift call to use getBlobSize and getBlobSha1. Reviewed By: pkaush Differential Revision: D18663376 fbshipit-source-id: 86baefc9004a07aac4ddf5849870431be04c75f2
48 lines
1.1 KiB
C++
48 lines
1.1 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 <memory>
|
|
#include <vector>
|
|
|
|
namespace folly {
|
|
template <typename T>
|
|
class Future;
|
|
struct Unit;
|
|
} // namespace folly
|
|
|
|
namespace facebook {
|
|
namespace eden {
|
|
|
|
class Blob;
|
|
class BlobMetadata;
|
|
class Hash;
|
|
class Tree;
|
|
|
|
class IObjectStore {
|
|
public:
|
|
virtual ~IObjectStore() {}
|
|
|
|
/*
|
|
* Object access APIs.
|
|
*/
|
|
virtual folly::Future<std::shared_ptr<const Tree>> getTree(
|
|
const Hash& id) const = 0;
|
|
virtual folly::Future<std::shared_ptr<const Blob>> getBlob(
|
|
const Hash& id) const = 0;
|
|
virtual folly::Future<std::shared_ptr<const Tree>> getTreeForCommit(
|
|
const Hash& commitID) const = 0;
|
|
virtual folly::Future<std::shared_ptr<const Tree>> getTreeForManifest(
|
|
const Hash& commitID,
|
|
const Hash& manifestID) const = 0;
|
|
virtual folly::Future<folly::Unit> prefetchBlobs(
|
|
const std::vector<Hash>& ids) const = 0;
|
|
};
|
|
} // namespace eden
|
|
} // namespace facebook
|