3 * @author Michal Sojka <sojkam1@fel.cvut.cz>
4 * @date Thu Nov 13 14:05:39 2008
6 * @brief FORB interface to resource allocator
13 #include "../contract/fres_contract_idl.idl"
17 * Interface to the allocator
20 interface resource_allocator {
22 * Creates or changes VRESes.
24 * This method is called after the contracts are
25 * negotiated with the resource manager. The manager
26 * together with the contract broker ensure that the
27 * state after applying the changes specified by @a
28 * schedulable_contracts parameter is schedulable. It
29 * is up to the allocator to apply the changes in such
30 * way that schedulability is maintained during the
31 * change. The changes are received in the same order
32 * as returned by the manager, so if the manager
33 * already prepares the order of aplying changes, the
34 * allocator can use it.
36 * @param schedulable_contracts Contracts for VRESes
37 * to be created or (if they already exist)
40 * @return Zero on success, non-zero error number in
43 long change_vreses(in contract::ptr_seq schedulable_contracts);
45 * Cancel VRESes given by their IDs.
49 * @return Zero on success, non-zero error code on error.
51 long cancel_vreses(in contract::id_seq ids);