- Valiantly recuperate Marco's comments in ResourcePolicyPriority with
the aid of GNU Emacs git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1255 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
972db124e6
commit
c3f77d68a3
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue