Revision 1265,
799 bytes
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.ArrayList; |
---|
| 4 | |
---|
| 5 | import schedframe.resources.ResourceType; |
---|
| 6 | import schedframe.resources.StandardResourceType; |
---|
| 7 | import schedframe.resources.computing.ComputingResource; |
---|
| 8 | |
---|
| 9 | public class ManagedComputingResources extends ArrayList<ComputingResource>{ |
---|
| 10 | |
---|
| 11 | private static final long serialVersionUID = 1L; |
---|
| 12 | |
---|
| 13 | private ResourceType type; |
---|
| 14 | |
---|
| 15 | public boolean add(ComputingResource compRes){ |
---|
| 16 | if(type == null){ |
---|
| 17 | type = compRes.getType(); |
---|
| 18 | } |
---|
[1265] | 19 | return super.add(compRes); |
---|
| 20 | //TODO Check whether it's works find for all cases |
---|
| 21 | /*if(type.getName().equals(compRes.getType().getName())) |
---|
[477] | 22 | return super.add(compRes); |
---|
[1265] | 23 | return false;*/ |
---|
[477] | 24 | } |
---|
| 25 | |
---|
| 26 | public ResourceType getType() { |
---|
| 27 | if (type == null) |
---|
| 28 | return StandardResourceType.Undefined; |
---|
| 29 | return type; |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.