API to get total pending work orders for an operator - Total includes normal and rebuild work orders.
Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/6d9eaa35 Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/6d9eaa35 Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/6d9eaa35 Branch: refs/heads/frontend-backend Commit: 6d9eaa35b8a6254811a80b08773a2a7cbcd03577 Parents: 7047d3d Author: Harshad Deshmukh <hbdeshm...@apache.org> Authored: Wed Apr 19 13:31:08 2017 -0500 Committer: Hakan Memisoglu <hakanmemiso...@apache.org> Committed: Tue May 2 00:12:54 2017 -0500 ---------------------------------------------------------------------- query_execution/WorkOrdersContainer.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/6d9eaa35/query_execution/WorkOrdersContainer.hpp ---------------------------------------------------------------------- diff --git a/query_execution/WorkOrdersContainer.hpp b/query_execution/WorkOrdersContainer.hpp index c1739bc..1fb3ca6 100644 --- a/query_execution/WorkOrdersContainer.hpp +++ b/query_execution/WorkOrdersContainer.hpp @@ -311,6 +311,19 @@ class WorkOrdersContainer { return rebuild_workorders_[operator_index].getNumWorkOrders(); } + /** + * @brief Get the total number of work orders for the given operator. + * + * @param operator_index The index of the operator. + * + * @return The total number of WorkOrders (normal + rebuild). + **/ + inline std::size_t getNumTotalWorkOrders( + const std::size_t operator_index) const { + return getNumNormalWorkOrders(operator_index) + + getNumRebuildWorkOrders(operator_index); + } + private: /** * @brief An internal queue-based container structure to hold the WorkOrders.