/** * @file frm.idl * @author Michal Sojka * @date Sat Oct 25 21:57:56 2008 * * @brief FORB interface of resource manager * * */ #ifndef _FRM_IDL #define _FRM_IDL #include "../contract/fres_contract_idl.idl" module fres { /** Resource manager */ interface resource_manager { /** * Executes admission test and if the contracts are * accepted, they are put to "reserved" state. * * @todo If a contract is in the "reserved" state, and * reserve_contracts() is called again with the same * contract, the previously reserved contract should * be replaced with the new one. * * @param contracts New contracts to be reserved. * * @return * - Zero if reservation (admisson test) was successfull, * - one if admission test was not successfull and * - negative error code if an error occured. */ long reserve_contracts(in contract::ptr_seq contracts); /** * Puts contracts with given IDs to the "commited" * state and sends back the changes to VRESes to reach * the new state. * * @param[in] ids IDs of contracts to be commited. * * @param[out] schedulable_contracts Schedulable * contracts, for new or changed VRESes. These * contract may be extened by one or more data blocks * for use by the scheduler. The scheduler receives * the contracts in the same order as they are * returned. */ void commit_contracts(in contract::id_seq ids, out contract::ptr_seq schedulable_contracts); void cancel_contracts(in contract::id_seq ids); }; }; #endif