3 * @author Michal Sojka <sojkam1@fel.cvut.cz>
4 * @date Sat Oct 25 21:57:56 2008
6 * @brief FORB interface of resource manager
13 #include "../contract/fres_contract_idl.idl"
17 /** Resource manager */
18 interface resource_manager {
20 * Executes admission test and if the contracts are
21 * accepted, they are put to "reserved" state.
23 * @todo If a contract is in the "reserved" state, and
24 * reserve_contracts() is called again with the same
25 * contract, the previously reserved contract should
26 * be replaced with the new one.
28 * @param contracts New contracts to be reserved.
31 * - Zero if reservation (admisson test) was successfull,
32 * - one if admission test was not successfull and
33 * - negative error code if an error occured.
35 long reserve_contracts(in contract::ptr_seq contracts);
38 * Puts contracts with given IDs to the "commited"
39 * state and sends back the changes to VRESes to reach
42 * @param[in] ids IDs of contracts to be commited.
44 * @param[out] schedulable_contracts Schedulable
45 * contracts, for new or changed VRESes. These
46 * contract may be extened by one or more data blocks
47 * for use by the allocator. The allocator receives
48 * the contracts in the same order as they are
51 void commit_contracts(in contract::id_seq ids,
52 out contract::ptr_seq schedulable_contracts);
53 void cancel_contracts(in contract::id_seq ids);
56 * Returns the list of commited contracts
58 * @param contracts Commited contracts
60 * @param utilization Utilization in the range 0-100
61 * (for visualization) or -1 if utilization cannot be
64 void get_contracts(out contract::ptr_seq contracts, out long utilization);