source: DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/ClusterResourceManager.java @ 1415

Revision 1415, 1.1 KB checked in by wojtekp, 11 years ago (diff)
  • Property svn:mime-type set to text/plain
RevLine 
[477]1package schedframe.scheduling.manager.resources;
2
3import java.util.List;
4import java.util.Properties;
5
6import schedframe.resources.StandardResourceType;
[1415]7import schedframe.resources.computing.ComputingResource;
[1247]8import schedframe.resources.computing.Node;
[477]9import schedframe.resources.computing.Processor;
10import schedframe.scheduling.Scheduler;
11
12
13public class ClusterResourceManager extends LocalResourceManager {
14
15        public ClusterResourceManager(List<ComputingResource> resources, List<Scheduler> schedulers, ManagedResources managedResources) {
16                super(resources, schedulers, managedResources.getResourceUnits());
17                // TODO Auto-generated constructor stub
18        }
19
20        @SuppressWarnings("unchecked")
[1247]21        public List<Node> getNodes(){
[1415]22                return (List<Node>) getResourcesOfType(StandardResourceType.Node);
[477]23        }
24       
25        @SuppressWarnings("unchecked")
26        public List<Processor> getProcessors(){
[1415]27                return (List<Processor>) getResourcesOfType(StandardResourceType.Processor);
[477]28        }
29
30        @SuppressWarnings("unchecked")
[1247]31        public List<Node> getNodes(Properties properties){
[1207]32                properties.setProperty("type", StandardResourceType.Node.toString());
[1247]33                return (List<Node>) filterResources(properties);
[477]34
35        }
36
37}
Note: See TracBrowser for help on using the repository browser.