[477] | 1 | package simulator; |
---|
| 2 | |
---|
| 3 | |
---|
| 4 | |
---|
| 5 | import java.util.List; |
---|
| 6 | |
---|
[490] | 7 | import dcworms.schedframe.scheduling.utils.JobDescription; |
---|
| 8 | import dcworms.schedframe.scheduling.utils.TaskDescription; |
---|
| 9 | |
---|
[477] | 10 | import schedframe.scheduling.tasks.Job; |
---|
| 11 | import schedframe.scheduling.tasks.JobInterface; |
---|
| 12 | |
---|
| 13 | |
---|
| 14 | /** |
---|
| 15 | * This interface introduces a generic user entity, which is intended to send jobs and tasks |
---|
| 16 | * to a broker entity. |
---|
| 17 | * |
---|
| 18 | * @author Stanislaw Szczepanowski |
---|
| 19 | * @param <SubJob> a job type, which implements the {@link Job} interface |
---|
| 20 | */ |
---|
| 21 | public interface GenericUser { |
---|
| 22 | |
---|
| 23 | /** |
---|
| 24 | * @return a list of all jobs, that have been sent by the user entity |
---|
| 25 | */ |
---|
| 26 | public List<JobDescription> getAllSentJobs(); |
---|
| 27 | |
---|
| 28 | /** |
---|
| 29 | * @return a list of all tasks, that have been sent by the user entity |
---|
| 30 | */ |
---|
| 31 | public List<TaskDescription> getAllSentTasks(); |
---|
| 32 | |
---|
| 33 | /** |
---|
| 34 | * @return a list of all jobs, that have returned from execution to the user entity |
---|
| 35 | */ |
---|
| 36 | public List<JobInterface<?>> getAllReceivedJobs(); |
---|
| 37 | |
---|
| 38 | /** |
---|
| 39 | * @return the name of the user entity (unique in the entire simulation run) |
---|
| 40 | */ |
---|
| 41 | public String getUserName(); |
---|
| 42 | |
---|
| 43 | public int getFinishedTasksCount() ; |
---|
| 44 | |
---|
| 45 | |
---|
| 46 | /** |
---|
| 47 | * This method is intended for debug purposes. |
---|
| 48 | * @return <code>true</code> if during the simulation, any error occurred |
---|
| 49 | * (e.g. the same job has been returned twice). |
---|
| 50 | */ |
---|
| 51 | public boolean isError(); |
---|
[686] | 52 | |
---|
| 53 | public long getSubmissionStartTime(); |
---|
| 54 | |
---|
| 55 | public boolean isSimStartTimeDefined(); |
---|
[477] | 56 | } |
---|