source: DCWoRMS/trunk/build/classes/schedframe/scheduling/tasks/WorkloadUnit.java @ 477

Revision 477, 1.3 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 schedframe.DescriptionContainer;
6import schedframe.scheduling.WorkloadUnitHandler;
7import schedframe.scheduling.manager.tasks.JobRegistryImpl;
8import schedframe.scheduling.policy.AbstractManagementSystem;
9
10public interface WorkloadUnit<T> extends DescriptionContainer<T> {
11
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;
18       
19        /**
20         *
21         * @return list of tasks which belongs to this job
22         */
23        public abstract List<? extends TaskInterface<?>> getTask();
24       
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         */
43        public int getStatus();
44       
45        public void setStatus(int status) throws Exception;
46       
47        public boolean isFinished();
48       
49        public int getUserID();
50       
51        public boolean isRegistered();
52
53        public void register(JobRegistryImpl jobRegistry);
54       
55        public void accept(WorkloadUnitHandler wuh);
56
57}
Note: See TracBrowser for help on using the repository browser.