Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

StrictPolicy.idl

Go to the documentation of this file.
00001 
00002 #ifndef _strict_policy_idl
00003 #define _strict_policy_idl
00004 
00005 /**
00006  * @file StrictPolicy.idl
00007  *
00008  * IDL file for the StrictPolicy sub-interface.
00009  *
00010  * @todo Rename the file to something appropriate, like BrokerPolicies.idl.
00011  */
00012 
00013 #include "Broker.idl"
00014 
00015 /**
00016  * Name space for subclasses of Broker::Policy.
00017  */
00018 module BrokerPolicies
00019 {
00020     /**
00021      * A simple strict priority-based contention policy.  The priority is a
00022      * signed integer where larger values indicate a higher priority.
00023      *
00024      * @sa StrictPolicyImpl
00025      */
00026     interface StrictPolicy : Broker::Policy
00027     {
00028         /**
00029          * Set the priority of a task.
00030          *
00031          * @param task The task whose priority should be changed.
00032          * @param priority The new priority.
00033          *
00034          * @exception CORBA::BAD_PARAM if task is nil.
00035          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00036          */
00037         void SetTaskPriority(in Broker::Task task, in short priority);
00038     
00039         /**
00040          * Get the priority of a task.
00041          *
00042          * @param task The task whose priority should be retrieved.
00043          * @return The task's priority.
00044          *
00045          * @exception CORBA::BAD_PARAM if task is nil.
00046          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00047          */
00048         short GetTaskPriority(in Broker::Task task);
00049     };
00050 
00051     /**
00052      * A contention policy based on weights, where the weight is the task's
00053      * proportional share.
00054      *
00055      * @sa WeightedPolicyImpl
00056      */
00057     interface WeightedPolicy : Broker::Policy
00058     {
00059         /**
00060          * Set the weight of a task.
00061          *
00062          * @param task The task whose priority should be changed.
00063          * @param weight The new weight.
00064          *
00065          * @exception CORBA::BAD_PARAM if task is nil.
00066          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00067          */
00068         void SetTaskWeight(in Broker::Task task, in unsigned short weight);
00069 
00070         /**
00071          * Get the weight of a task.
00072          *
00073          * @param task The task whose weight should be retrieved.
00074          * @return The task's weight.
00075          *
00076          * @exception CORBA::BAD_PARAM if task is nil.
00077          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00078          */
00079         unsigned short GetTaskWeight(in Broker::Task task);
00080     };
00081     
00082     /**
00083      * A contention policy that delegates decisions to zero or more
00084      * subpolicies.
00085      *
00086      * @sa PartitionPolicyImpl
00087      */
00088     interface PartitionPolicy : Broker::Policy
00089     {
00090         /**
00091          * The default policy to attach tasks to when they are added to a
00092          * manager.
00093          */
00094         attribute Broker::Policy DefaultPolicy;
00095 
00096         /**
00097          * Set the subpolicy for a task.
00098          *
00099          * @param task The task whose policy should be changed.
00100          * @param bp The new policy.
00101          *
00102          * @exception CORBA::BAD_PARAM if task is nil.
00103          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00104          */
00105         void SetTaskPolicy(in Broker::Task task, in Broker::Policy bp);
00106 
00107         /**
00108          * Get the subpolicy for a task.
00109          *
00110          * @param task The task whose policy should be retrieved.
00111          * @return The task's policy.
00112          *
00113          * @exception CORBA::BAD_PARAM if task is nil.
00114          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00115          */
00116         Broker::Policy GetTaskPolicy(in Broker::Task task);
00117     };
00118 };
00119 
00120 #endif

Generated on Fri Oct 22 07:50:24 2004 for CPU Broker by  doxygen 1.3.9.1