source: DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/ManagedComputingResources.java @ 1265

Revision 1265, 799 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.ArrayList;
4
5import schedframe.resources.ResourceType;
6import schedframe.resources.StandardResourceType;
7import schedframe.resources.computing.ComputingResource;
8
9public 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                }
19                return super.add(compRes);
20                //TODO Check whether it's works find for all cases
21                /*if(type.getName().equals(compRes.getType().getName()))
22                        return super.add(compRes);
23                return false;*/
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.