source: DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/ResourceAllocation.java @ 1377

Revision 1377, 855 bytes checked in by wojtekp, 11 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.scheduling.manager.resources;
2
3import java.util.Map;
4
5import schedframe.resources.units.ResourceUnit;
6import schedframe.resources.units.ResourceUnitName;
7
8public interface ResourceAllocation {
9       
10        /**
11         * Allocates resource units( marks as used) on the basis of given resource
12         * units.
13         *
14         * @param freeRes
15         *            resource units to be consumed
16         * @param exclusive
17         *           allocate resources in exclusive mode
18         */
19        public boolean allocateResources(Map<ResourceUnitName, ResourceUnit> freeRes, boolean exclusive);
20
21        /**
22         * Frees given resource units.
23         *
24         * @param lastUsedResources
25         *            resource units to be free
26         * @param exclusive
27         *            free resources allocated in exclusive mode
28         */
29        public void freeResources(Map<ResourceUnitName, ResourceUnit> lastUsedResources, boolean exclusive);
30
31       
32}
Note: See TracBrowser for help on using the repository browser.