package schedframe.scheduling.tasks; import java.util.List; import org.joda.time.DateTime; import org.joda.time.ReadableDuration; import schedframe.DescriptionContainer; import schedframe.scheduling.tasks.requirements.ResourceParameterName; /** * * @author Marcin Krystek * */ public interface TaskInterface extends WorkloadUnit, DescriptionContainer { /** * * @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(); /** * * @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 ResourceConsumptionProfile getResourceConsumptionProfile(); public String getApplicationName(); }