Ignore:
Timestamp:
10/31/12 13:52:06 (12 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/AbstractProcesses.java

    r477 r539  
    33import schedframe.scheduling.tasks.requirements.ResourceParameterName; 
    44 
    5 public abstract class AbstractProcesses<T> implements WorkloadUnit<T>{ 
     5public abstract class AbstractProcesses implements WorkloadUnit{ 
    66         
    77         
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Job.java

    r477 r539  
    1818import schedframe.scheduling.WorkloadUnitHandler; 
    1919import schedframe.scheduling.manager.tasks.JobRegistryImpl; 
    20 import schedframe.scheduling.policy.AbstractManagementSystem; 
    2120 
    2221 
     
    179178        } 
    180179         
    181         public int getUserID(){ 
     180        public int getUserId(){ 
    182181                return this.senderId; 
    183182        } 
     
    204203                 
    205204                List<Task> readyTasks = new ArrayList<Task>(); 
    206  
    207205                int size = tasks.size(); 
     206                 
    208207                for(int i = 0; i < size; i++){ 
    209208                        int parCnt; 
     
    216215                        } catch(Exception e){ 
    217216                                parCnt = 0; 
    218                                 //e.printStackTrace(); 
    219                         } 
    220                         if(parCnt == 0) 
    221                         { 
     217                        } 
     218                        if(parCnt == 0) { 
    222219                                readyTasks.add(task); 
    223220                        } 
    224                         else 
    225                         { 
     221                        else { 
    226222                                for(int j = 0; j < parCnt; j++){ 
    227223                                        ParentType par = task.getDescription().getWorkflow().getParent(j); 
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/JobInterface.java

    r477 r539  
    1111 * 
    1212 */ 
    13 public interface JobInterface<T> extends WorkloadUnit<T> { 
     13public interface JobInterface<T> extends WorkloadUnit, DescriptionContainer<T> { 
    1414 
    1515        /** 
     
    1818         * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained 
    1919         */ 
    20         public abstract String getId() throws NoSuchFieldException; 
     20        //public abstract String getId() throws NoSuchFieldException; 
    2121         
    2222        /** 
     
    4444         * @return constant which represents current status of this job 
    4545         */ 
    46         public int getStatus(); 
     46        //public int getStatus(); 
    4747         
    48         public int getUserID(); 
     48        //public int getUserID(); 
    4949} 
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Processes.java

    r477 r539  
    11package schedframe.scheduling.tasks; 
    2  
    3 import java.util.List; 
    42 
    53import org.qcg.broker.schemas.resreqs.ComputingResourceBaseTypeItem; 
     
    196194        } 
    197195 
    198         public org.qcg.broker.schemas.resreqs.Processes getDescription(){ 
    199                 return this.pr; 
    200         } 
    201  
    202         @Override 
    203         public List getTask() { 
    204                 // TODO Auto-generated method stub 
    205                 return null; 
    206         } 
    207  
    208         @Override 
    209         public TaskInterface getTask(String taskId) throws NoSuchFieldException { 
    210                 // TODO Auto-generated method stub 
    211                 return null; 
    212         } 
    213  
    214         @Override 
    215         public int getTaskCount() { 
     196        public int getStatus() { 
     197                return this.status; 
     198        } 
     199 
     200        @Override 
     201        public int getUserId() { 
    216202                // TODO Auto-generated method stub 
    217203                return 0; 
    218204        } 
    219205 
    220         @Override 
    221         public int getStatus() { 
    222                 // TODO Auto-generated method stub 
    223                 return 0; 
    224         } 
    225  
    226         @Override 
    227         public int getUserID() { 
    228                 // TODO Auto-generated method stub 
    229                 return 0; 
    230         } 
    231  
    232         @Override 
    233         public String getDocument() throws Exception { 
    234                 // TODO Auto-generated method stub 
    235                 return null; 
    236         } 
     206 
    237207 
    238208        @Override 
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/Task.java

    r477 r539  
    3030import schedframe.scheduling.WorkloadUnitHandler; 
    3131import schedframe.scheduling.manager.tasks.JobRegistryImpl; 
    32 import schedframe.scheduling.policy.AbstractManagementSystem; 
    3332import schedframe.scheduling.tasks.requirements.ResourceParameterName; 
    3433 
     
    3837 * 
    3938 */ 
    40 public class Task /*extends AbstractTask*/ implements TaskInterface<org.qcg.broker.schemas.resreqs.Task> { 
     39public class Task implements TaskInterface<org.qcg.broker.schemas.resreqs.Task> { 
    4140         
    4241        protected static Unmarshaller unmarshaller; 
     
    7271        private int senderId; 
    7372        private long workloadLogWaitTime; 
    74         //String resPathHistory; 
    75          
     73 
    7674        public Task(org.qcg.broker.schemas.resreqs.Task task){ 
    7775                this.task = task; 
     
    8078                this.brokerSubmitTime = null; 
    8179                this.duration = null; 
    82         //      this.gridletID_ = (getJobId() + "_" + getId()).hashCode(); 
    8380                prepareTopology(); 
    8481        } 
     
    9188                this.brokerSubmitTime = null; 
    9289                this.duration = null; 
    93         //      this.gridletID_ = (getJobId() + getId()).hashCode(); 
    9490                prepareTopology(); 
    9591        } 
     
    269265        } 
    270266 
    271         public String getUserDn() { 
     267        public String getUserDN() { 
    272268                return this.task.getUserDN(); 
    273269        } 
     
    471467        }*/ 
    472468 
     469 
    473470        @Override 
    474         public List <Task> getTask() { 
    475                 List<Task> tasks = new ArrayList<Task>(); 
    476                 tasks.add(this); 
    477                 return tasks; 
    478         } 
    479  
    480         @Override 
    481         public Task getTask(String taskId) throws NoSuchFieldException { 
    482                 // TODO Auto-generated method stub 
    483                 return null; 
    484         } 
    485  
    486         @Override 
    487         public int getTaskCount() { 
     471        public int getUserId() { 
    488472                // TODO Auto-generated method stub 
    489473                return 0; 
    490474        } 
    491475 
    492         @Override 
    493         public int getUserID() { 
    494                 // TODO Auto-generated method stub 
    495                 return 0; 
    496         } 
    497  
    498476        public boolean isRegistered() { 
    499477                return isRegistered; 
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/TaskInterface.java

    r477 r539  
    66import org.joda.time.ReadableDuration; 
    77 
     8import schedframe.DescriptionContainer; 
    89import schedframe.scheduling.tasks.requirements.ResourceParameterName; 
    910 
     
    1415 * 
    1516 */ 
    16 public interface TaskInterface<T> extends WorkloadUnit<T> { 
     17public interface TaskInterface<T> extends WorkloadUnit, DescriptionContainer<T> { 
    1718         
    1819        /** 
     
    2021         * @return task identifier 
    2122         */ 
    22         public abstract String getId(); 
     23        //public abstract String getId(); 
    2324         
    2425        /** 
     
    3334         * submitted this task.  
    3435         */ 
    35         public abstract String getUserDn(); 
     36        public abstract String getUserDN(); 
    3637         
    3738        /** 
     
    8788         */ 
    8889        public long getLength(); 
    89          
    90         /** 
    91          *  
    92          * @param length measured in instructions. 
    93          */ 
    94         public void setLength(long length); 
    95          
     90 
    9691        /** 
    9792         *  
    9893         * @return constant which represent current task status 
    9994         */ 
    100         public int getStatus(); 
     95        //public int getStatus(); 
    10196         
    10297         
     
    107102        public List<AbstractProcesses> getProcesses(AbstractProcessesGroup processGroup); 
    108103         
    109         public void setStatus(int status) throws Exception; 
     104        //public void setStatus(int status) throws Exception; 
    110105         
    111106        public double getCpuCntRequest() throws NoSuchFieldException; 
     
    114109         
    115110        public long getWorkloadLogWaitTime(); 
    116          
    117         //public void addToResPath(String resName); 
    118          
    119         //public String getResPath(); 
     111 
    120112                 
    121113} 
  • DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/WorkloadUnit.java

    r477 r539  
    11package schedframe.scheduling.tasks; 
    22 
    3 import java.util.List; 
    4  
    5 import schedframe.DescriptionContainer; 
    63import schedframe.scheduling.WorkloadUnitHandler; 
    74import schedframe.scheduling.manager.tasks.JobRegistryImpl; 
    8 import schedframe.scheduling.policy.AbstractManagementSystem; 
    95 
    10 public interface WorkloadUnit<T> extends DescriptionContainer<T> { 
     6public interface WorkloadUnit { 
    117 
    12         /** 
    13          *  
    14          * @return job identifier 
    15          * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained 
    16          */ 
    17         public abstract String getId() throws NoSuchFieldException; 
     8        public String getId(); 
    189         
    19         /** 
    20          *  
    21          * @return list of tasks which belongs to this job 
    22          */ 
    23         public abstract List<? extends TaskInterface<?>> getTask(); 
     10        public int getUserId(); 
    2411         
    25         /** 
    26          *  
    27          * @param taskId 
    28          * @return task with specified taskId 
    29          * @throws NoSuchFieldException if task with taskId does not exist in this job 
    30          */ 
    31         public abstract TaskInterface<?> getTask(String taskId) throws NoSuchFieldException; 
    32          
    33         /** 
    34          *  
    35          * @return number of tasks in this job  
    36          */ 
    37         public abstract int getTaskCount(); 
    38          
    39         /** 
    40          *  
    41          * @return constant which represents current status of this job 
    42          */ 
    4312        public int getStatus(); 
    4413         
    4514        public void setStatus(int status) throws Exception; 
    46          
     15 
    4716        public boolean isFinished(); 
    48          
    49         public int getUserID(); 
    50          
     17 
    5118        public boolean isRegistered(); 
    5219 
Note: See TracChangeset for help on using the changeset viewer.