This is an automated email from the ASF dual-hosted git repository. wesm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push: new ac4bb69 ARROW-1852: [C++] Make retrieval of Plasma manager fd a const operation ac4bb69 is described below commit ac4bb6990fef485a3178361881943e843da0f3c7 Author: Matthias Vallentin <vallen...@icir.org> AuthorDate: Fri Nov 24 09:12:51 2017 -0500 ARROW-1852: [C++] Make retrieval of Plasma manager fd a const operation This small patch makes it possible to retrieve the manager fd in a `const` context. For example: ```cpp class handle { public: bool connected() const { return client_.get_manager_fd() != -1; } private: plasma::PlasmaClient client_; }; ``` Without this patch, it's impossible to implement the above function. An alternative would be to simply provide such a utility function as part of `PlasmaClient`, but this changes the API. Let me know what you prefer. Author: Matthias Vallentin <vallen...@icir.org> Closes #1352 from mavam/topic/plasma-manager-fd and squashes the following commits: f4d4ad37 [Matthias Vallentin] Make retrieval of manager fd a const operation --- cpp/src/plasma/client.cc | 2 +- cpp/src/plasma/client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/plasma/client.cc b/cpp/src/plasma/client.cc index dd32bdc..9bbafac 100644 --- a/cpp/src/plasma/client.cc +++ b/cpp/src/plasma/client.cc @@ -617,7 +617,7 @@ Status PlasmaClient::Fetch(int num_object_ids, const ObjectID* object_ids) { return SendFetchRequest(manager_conn_, object_ids, num_object_ids); } -int PlasmaClient::get_manager_fd() { return manager_conn_; } +int PlasmaClient::get_manager_fd() const { return manager_conn_; } Status PlasmaClient::Info(const ObjectID& object_id, int* object_status) { ARROW_CHECK(manager_conn_ >= 0); diff --git a/cpp/src/plasma/client.h b/cpp/src/plasma/client.h index 89df2b0..cfd11c1 100644 --- a/cpp/src/plasma/client.h +++ b/cpp/src/plasma/client.h @@ -313,7 +313,7 @@ class ARROW_EXPORT PlasmaClient { /// /// \return The file descriptor for the manager connection. If there is no /// connection to the manager, this is -1. - int get_manager_fd(); + int get_manager_fd() const; private: /// This is a helper method for unmapping objects for which all references have -- To stop receiving notification emails like this one, please contact ['"commits@arrow.apache.org" <commits@arrow.apache.org>'].