package schedframe.scheduling.tasks; import java.util.List; import schedframe.DescriptionContainer; import schedframe.scheduling.WorkloadUnitHandler; import schedframe.scheduling.manager.tasks.JobRegistryImpl; import schedframe.scheduling.policy.AbstractManagementSystem; public interface WorkloadUnit extends DescriptionContainer { /** * * @return job identifier * @throws NoSuchFieldException if there is no tasks for this job, and job id can not be obtained */ public abstract String getId() throws NoSuchFieldException; /** * * @return list of tasks which belongs to this job */ public abstract List> getTask(); /** * * @param taskId * @return task with specified taskId * @throws NoSuchFieldException if task with taskId does not exist in this job */ public abstract TaskInterface getTask(String taskId) throws NoSuchFieldException; /** * * @return number of tasks in this job */ public abstract int getTaskCount(); /** * * @return constant which represents current status of this job */ public int getStatus(); public void setStatus(int status) throws Exception; public boolean isFinished(); public int getUserID(); public boolean isRegistered(); public void register(JobRegistryImpl jobRegistry); public void accept(WorkloadUnitHandler wuh); }