diff --git a/src/backend/resource_policy_priority.hh b/src/backend/resource_policy_priority.hh index 1d29c56..3aa27f1 100644 --- a/src/backend/resource_policy_priority.hh +++ b/src/backend/resource_policy_priority.hh @@ -31,43 +31,61 @@ namespace sgpem { + + /// \brief A resource allocation policy which provides a better service + /// to higer priority threads. + /// + /// A resource allocation policy which provides a better service + /// to higer priority threads. This policy sorts the request queues + /// following the priority of the owners of the requests. class ResourcePolicyPriority; - /** \brief - It's a Strategy wich stay for a resource allocating algorithm. - It implements the related resource allocation policy. - */ class ResourcePolicyPriority : public ResourcePolicy { public: + + /// \brief Standard virtual destructor. + /// + /// Standard virtual destructor. virtual ~ResourcePolicyPriority(); - /** - Initialize the inner components of the policy. - - Because it's a pure virtual method, must be re-implemented - in concrete derived classes. - */ + /// \brief Initializes the inner components of the policy. + /// + /// Does nothing. virtual void configure() throw(UserInterruptException); - /** - Mixes the queues. - */ + /// \brief Sorts the subrequest queue letting higher priority threads to be the first ones + /// to get the resources. + /// + /// Sorts the subrequest queue letting higher priority threads to be the first ones + /// to get the resources. + /// + /// \param environment the environment on which the policy applies. + /// \param queue the queue where a subrequest has just been added. + /// \param sr the subrequest which has just been added. virtual void enforce(Environment& environment, Environment::SubRequestQueue& queue, SubRequest& sr) throw(UserInterruptException); - /** - Gets a string description of the policy. - - Because it's a pure virtual method, must be re-implemented - in concrete derived classes. - \return String description of the policy. - */ + /// \brief Returns a description of the policy. + /// + /// Returns a description of the policy. + /// \return a description of the policy. virtual Glib::ustring get_description() const; + /// \brief Returns the name of the policy. + /// + /// Returns the name of the policy. + /// \return the name of the policy. virtual Glib::ustring get_name() const; + + /// \brief Activates the policy. + /// + /// Does nothing. virtual void activate(); + /// \brief Deactivates the policy. + /// + /// Does nothing. virtual void deactivate(); };