source: xssim/trunk/src/schedframe/scheduling/TaskInterface.java @ 104

Revision 104, 3.2 KB checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.scheduling;
2
3import java.util.List;
4
5import org.joda.time.DateTime;
6import org.joda.time.ReadableDuration;
7
8import schedframe.scheduling.utils.DescriptionContainer;
9import schedframe.scheduling.utils.ResourceParameterName;
10import test.rewolucja.GSSIMJobInterface;
11
12
13/**
14 *
15 * @author Marcin Krystek
16 *
17 */
18public interface TaskInterface<T> extends GSSIMJobInterface<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         * @param length measured in instructions.
95         */
96        public void setLength(long length);
97       
98        /**
99         *
100         * @return constant which represent current task status
101         */
102        public int getStatus();
103       
104       
105        public List<AbstractProcessesGroup> getProcessesGroups();
106       
107        public List<AbstractProcesses> getProcesses();
108       
109        public List<AbstractProcesses> getProcesses(AbstractProcessesGroup processGroup);
110       
111        public void setStatus(int status) throws Exception;
112       
113        public double getCpuCntRequest() throws NoSuchFieldException;
114       
115        public double getMemoryRequest() throws NoSuchFieldException;
116       
117        public long getWorkloadLogWaitTime();
118       
119        //public void addToResPath(String resName);
120       
121        //public String getResPath();
122               
123}
Note: See TracBrowser for help on using the repository browser.