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

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