package schedframe.scheduling; import java.util.List; import org.joda.time.DateTime; import org.joda.time.ReadableDuration; import schedframe.scheduling.utils.DescriptionContainer; import schedframe.scheduling.utils.ResourceParameterName; import test.rewolucja.GSSIMJobInterface; /** * * @author Marcin Krystek * */ public interface TaskInterface extends GSSIMJobInterface { /** * * @return task identifier */ public abstract String getId(); /** * * @return job identifier. This is the id of the job which contains this task */ public abstract String getJobId(); /** * * @return user identifier. This is id (distinguish name) of the user who has * submitted this task. */ public abstract String getUserDn(); /** * * @return time when this task was submitted */ public abstract DateTime getSubmissionTimeToBroker(); /** * * @return the earliest time when the execution of this task can be started * @throws NoSuchFieldException if value is not specified */ public abstract DateTime getExecutionStartTime() throws NoSuchFieldException; /** * * @return the latest time when the execution of this task must be ended * @throws NoSuchFieldException if value is not specified */ public abstract DateTime getExecutionEndTime() throws NoSuchFieldException; /** * * @return user expectation about how long it will take to execute this task * @throws NoSuchFieldException if value is not specified */ public abstract ReadableDuration getExpectedDuration() throws NoSuchFieldException; /** * * @param parameterName name of the task resource requirement * @return value of the numeral parameter which describes task resource requirement * @throws NoSuchFieldException if such parameter is not defined * @throws IllegalArgumentException if requested parameter is String value */ public abstract double getParameterDoubleValue(ResourceParameterName parameterName) throws NoSuchFieldException, IllegalArgumentException; /** * * @param parameterName name of the task resource requirement * @return value of the String parameter which describes task resource requirement * @throws NoSuchFieldException if such parameter is not defined * @throws IllegalArgumentException if requested parameter is Double value */ public abstract String getParameterStringValue(ResourceParameterName parameterName) throws NoSuchFieldException, IllegalArgumentException; /** * * @return length measured in instructions. */ public long getLength(); /** * * @param length measured in instructions. */ public void setLength(long length); /** * * @return constant which represent current task status */ public int getStatus(); public List getProcessesGroups(); public List getProcesses(); public List getProcesses(AbstractProcessesGroup processGroup); public void setStatus(int status) throws Exception; public double getCpuCntRequest() throws NoSuchFieldException; public double getMemoryRequest() throws NoSuchFieldException; public long getWorkloadLogWaitTime(); //public void addToResPath(String resName); //public String getResPath(); }