Revision 1415,
1.1 KB
checked in by wojtekp, 11 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[477] | 1 | package schedframe.scheduling.manager.resources; |
---|
| 2 | |
---|
| 3 | import java.util.List; |
---|
| 4 | import java.util.Properties; |
---|
| 5 | |
---|
| 6 | import schedframe.resources.StandardResourceType; |
---|
[1415] | 7 | import schedframe.resources.computing.ComputingResource; |
---|
[1247] | 8 | import schedframe.resources.computing.Node; |
---|
[477] | 9 | import schedframe.resources.computing.Processor; |
---|
| 10 | import schedframe.scheduling.Scheduler; |
---|
| 11 | |
---|
| 12 | |
---|
| 13 | public 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.