source: DCWoRMS/trunk/src/schedframe/scheduling/tasks/TaskInterface.java @ 481

Revision 481, 3.0 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.scheduling.tasks;
2
3import java.util.List;
4
5import org.joda.time.DateTime;
6import org.joda.time.ReadableDuration;
7
8import schedframe.DescriptionContainer;
9import schedframe.scheduling.tasks.requirements.ResourceParameterName;
10
11
12/**
13 *
14 * @author Marcin Krystek
15 *
16 */
17public interface TaskInterface<T> extends WorkloadUnit, DescriptionContainer<T> {
18       
19        /**
20         *
21         * @return task identifier
22         */
23        //public abstract String getId();
24       
25        /**
26         *
27         * @return job identifier. This is the id of the job which contains this task
28         */
29        public abstract String getJobId();
30       
31        /**
32         *
33         * @return user identifier. This is id (distinguish name) of the user who has
34         * submitted this task.
35         */
36        public abstract String getUserDN();
37       
38        /**
39         *
40         * @return time when this task was submitted
41         */
42        public abstract DateTime getSubmissionTimeToBroker();
43       
44        /**
45         *
46         * @return the earliest time when the execution of this task can be started
47         * @throws NoSuchFieldException if value is not specified
48         */
49        public abstract DateTime getExecutionStartTime() throws NoSuchFieldException;
50       
51        /**
52         *
53         * @return the latest time when the execution of this task must be ended
54         * @throws NoSuchFieldException if value is not specified
55         */
56        public abstract DateTime getExecutionEndTime() throws NoSuchFieldException;
57       
58        /**
59         *
60         * @return user expectation about how long it will take to execute this task
61         * @throws NoSuchFieldException if value is not specified
62         */
63        public abstract ReadableDuration getExpectedDuration() throws NoSuchFieldException;
64       
65        /**
66         *
67         * @param parameterName name of the task resource requirement
68         * @return value of the numeral parameter which describes task resource requirement
69         * @throws NoSuchFieldException if such parameter is not defined
70         * @throws IllegalArgumentException if requested parameter is String value
71         */
72        public abstract double getParameterDoubleValue(ResourceParameterName parameterName)
73                throws NoSuchFieldException, IllegalArgumentException;
74       
75        /**
76         *
77         * @param parameterName name of the task resource requirement
78         * @return value of the String parameter which describes task resource requirement
79         * @throws NoSuchFieldException if such parameter is not defined
80         * @throws IllegalArgumentException if requested parameter is Double value
81         */
82        public abstract String getParameterStringValue(ResourceParameterName parameterName)
83                throws NoSuchFieldException, IllegalArgumentException;
84       
85        /**
86         *
87         * @return length measured in instructions.
88         */
89        public long getLength();
90
91        /**
92         *
93         * @return constant which represent current task status
94         */
95        //public int getStatus();
96       
97       
98        public List<AbstractProcessesGroup> getProcessesGroups();
99       
100        public List<AbstractProcesses> getProcesses();
101       
102        public List<AbstractProcesses> getProcesses(AbstractProcessesGroup processGroup);
103       
104        //public void setStatus(int status) throws Exception;
105       
106        public double getCpuCntRequest() throws NoSuchFieldException;
107       
108        public double getMemoryRequest() throws NoSuchFieldException;
109       
110        public long getWorkloadLogWaitTime();
111
112               
113}
Note: See TracBrowser for help on using the repository browser.