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

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 
00011 #include "Broker.idl"
00012 
00013 /**
00014  * Name space for subclasses of Broker::Policy.
00015  */
00016 module BrokerPolicies
00017 {
00018     /**
00019      * A simple strict priority-based contention policy.
00020      *
00021      * @sa StrictPolicyImpl
00022      */
00023     interface StrictPolicy : Broker::Policy
00024     {
00025         /**
00026          * Set the priority of a task.
00027          *
00028          * @param task The task whose priority should be changed.
00029          * @param priority The new priority.
00030          *
00031          * @exception CORBA::BAD_PARAM if task is nil.
00032          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00033          */
00034         void SetTaskPriority(in Broker::Task task, in short priority);
00035     
00036         /**
00037          * Get the priority of a task.
00038          *
00039          * @param task The task whose priority should be changed.
00040          * @return The task's priority.
00041          *
00042          * @exception CORBA::BAD_PARAM if task is nil.
00043          * @exception CORBA::BAD_PARAM if task is not managed by this policy.
00044          */
00045         short GetTaskPriority(in Broker::Task task);
00046     
00047         /**
00048          * @return The maximum percentage of CPU that can be allocated to all
00049          * of the tasks.
00050          */
00051         float GetMaxCPUAllocation();
00052 
00053         /**
00054          * @param amount The maximum percentage of CPU that can be allocated to
00055          * all of the tasks.
00056          */
00057         void SetMaxCPUAllocation(in float amount);
00058 
00059         /**
00060          * The minimum value that can be passed to SetMaxCPUAllocation.
00061          */
00062         const float CPU_ALLOCATION_MIN = 0.01;
00063 
00064         /**
00065          * The maximum value that can be passed to SetMaxCPUAllocation.
00066          */
00067         const float CPU_ALLOCATION_MAX = 0.99;
00068     };
00069 };
00070 
00071 #endif

Generated on Mon Dec 1 16:29:07 2003 for CPU Broker by doxygen 1.3.4