]> rtime.felk.cvut.cz Git - frescor/frsh.git/blob - fres/resalloc/fra.idl
Resource allocator can report failure of vres cancelation
[frescor/frsh.git] / fres / resalloc / fra.idl
1 /**
2  * @file   fra.idl
3  * @author Michal Sojka <sojkam1@fel.cvut.cz>
4  * @date   Thu Nov 13 14:05:39 2008
5  * 
6  * @brief  FORB interface to resource allocator
7  * 
8  * 
9  */
10 #ifndef _FRA_IDL
11 #define _FRA_IDL
12
13 #include "../contract/fres_contract_idl.idl"
14
15 module fres {
16         /**
17          * Interface to the allocator
18          * 
19          */
20         interface resource_allocator {
21                 /**
22                  * Creates or changes VRESes.
23                  * 
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.
35                  *
36                  * @param schedulable_contracts Contracts for VRESes
37                  * to be created or (if they already exist)
38                  * changed.
39                  * 
40                  * @return Zero on success, non-zero error number in
41                  * case of error.
42                  */
43                 long change_vreses(in contract::ptr_seq schedulable_contracts);
44                 /** 
45                  * Cancel VRESes given by their IDs.
46                  * 
47                  * @param ids
48                  *
49                  * @return Zero on success, non-zero error code on error.
50                  */
51                 long cancel_vreses(in contract::id_seq ids);
52         };
53 };
54
55 #endif