source: DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/TaskInterface.java @ 1190

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