From 5b3ee91c84d37fe2cd7d4ddd9d26370447564161 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 20 Jun 2024 14:42:52 +0200 Subject: Mark IExecutionApi's methods constant --- .../execution_api/common/execution_api.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/buildtool/execution_api/common/execution_api.hpp') diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp index a4892258..1a8ee578 100644 --- a/src/buildtool/execution_api/common/execution_api.hpp +++ b/src/buildtool/execution_api/common/execution_api.hpp @@ -57,7 +57,7 @@ class IExecutionApi { std::vector const& output_files, std::vector const& output_dirs, std::map const& env_vars, - std::map const& properties) noexcept + std::map const& properties) const noexcept -> IExecutionAction::Ptr = 0; /// \brief Retrieve artifacts from CAS and store to specified paths. @@ -71,7 +71,7 @@ class IExecutionApi { std::vector const& artifacts_info, std::vector const& output_paths, std::optional> const& alternative = - std::nullopt) noexcept -> bool = 0; + std::nullopt) const noexcept -> bool = 0; /// \brief Retrieve artifacts from CAS and write to file descriptors. /// Tree artifacts are not resolved and instead the tree object will be @@ -81,14 +81,14 @@ class IExecutionApi { [[nodiscard]] virtual auto RetrieveToFds( std::vector const& artifacts_info, std::vector const& fds, - bool raw_tree) noexcept -> bool = 0; + bool raw_tree) const noexcept -> bool = 0; /// \brief Synchronization of artifacts between two CASes. Retrieves /// artifacts from one CAS and writes to another CAS. Tree artifacts are /// resolved and its containing file artifacts are recursively retrieved. [[nodiscard]] virtual auto RetrieveToCas( std::vector const& artifacts_info, - gsl::not_null const& api) noexcept -> bool = 0; + gsl::not_null const& api) const noexcept -> bool = 0; /// \brief A variant of RetrieveToCas that is allowed to internally use /// the specified number of threads to carry out the task in parallel. @@ -100,14 +100,14 @@ class IExecutionApi { std::vector const& artifacts_info, gsl::not_null const& api, std::size_t /* jobs */, - bool /* use_blob_splitting */) noexcept -> bool { + bool /* use_blob_splitting */) const noexcept -> bool { return RetrieveToCas(artifacts_info, api); } /// \brief Retrieve one artifact from CAS and make it available for /// furter in-memory processing [[nodiscard]] virtual auto RetrieveToMemory( - Artifact::ObjectInfo const& artifact_info) noexcept + Artifact::ObjectInfo const& artifact_info) const noexcept -> std::optional = 0; /// \brief Upload blobs to CAS. Uploads only the blobs that are not yet @@ -115,13 +115,13 @@ class IExecutionApi { /// \param blobs Container of blobs to upload. /// \param skip_find_missing Skip finding missing blobs, just upload all. /// NOLINTNEXTLINE(google-default-arguments) - [[nodiscard]] virtual auto Upload(ArtifactBlobContainer&& blobs, - bool skip_find_missing = false) noexcept - -> bool = 0; + [[nodiscard]] virtual auto Upload( + ArtifactBlobContainer&& blobs, + bool skip_find_missing = false) const noexcept -> bool = 0; [[nodiscard]] virtual auto UploadTree( - std::vector const& - artifacts) noexcept -> std::optional = 0; + std::vector const& artifacts) + const noexcept -> std::optional = 0; [[nodiscard]] virtual auto IsAvailable( ArtifactDigest const& digest) const noexcept -> bool = 0; -- cgit v1.2.3