|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ourgrid.mygrid.scheduler.jobmanager.JobEntry
public class JobEntry
The Job is an abstraction representing a set of tasks that the user requested to be executed.
Field Summary | |
---|---|
protected java.util.List<TaskEntry> |
tasks
All job's tasks. |
Constructor Summary | |
---|---|
JobEntry(int jobId,
JobSpec jobSpec,
int maxReplicas,
int maxFails)
This method constructs a new e constructor. |
Method Summary | |
---|---|
protected TaskEntry |
createTaskEntry(TaskSpec taskSpec,
int nextTaskId,
int id,
int maxTaskFails,
int maxTaskReplicas)
|
protected java.util.List<TaskEntry> |
createTasks(java.util.List<TaskSpec> taskSpecs)
Creates the job's tasks according the specification. |
java.util.List<TaskEntry> |
getAvailableTasks()
Returns the Job 's available Task s. |
int |
getId()
Returns the job identification. |
JobSpec |
getJobSpec()
|
java.lang.String |
getLabel()
Returns the job label. |
protected ReplicaEntry |
getNewReplica(TaskEntry task)
Creates and returns a new Replica . |
java.lang.String |
getRequirements()
Returns the job requirements expression. |
ExecutionStatus |
getStatus()
Returns the Job state according its Task s'
states. |
TaskEntry |
getTaskById(int taskId)
Returns a Task by its identification. |
java.util.List<TaskEntry> |
getTasks()
Returns the Job 'sTask s. |
protected void |
replicaAborted(ReplicaExecutorResult result)
Sets the replica contained in the ReplicaExecutorResult to
the aborted state. |
protected void |
replicaCancelled(ReplicaExecutorResult result)
Sets the replica contained in the ReplicaExecutorResult to
the canceled state. |
protected void |
replicaFailed(ReplicaExecutorResult result)
Sets the replica contained in the ReplicaExecutorResult to
the failed state. |
protected void |
replicaFinished(ReplicaExecutorResult result)
Sets the replica contained in the ReplicaExecutorResult to
the finished state. |
protected void |
setCancelled()
Sets the job as canceled. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<TaskEntry> tasks
Constructor Detail |
---|
public JobEntry(int jobId, JobSpec jobSpec, int maxReplicas, int maxFails)
jobId
- The Job identification.jobSpec
- The job specification.Method Detail |
---|
protected java.util.List<TaskEntry> createTasks(java.util.List<TaskSpec> taskSpecs)
taskSpecs
- A list containing TasksSpec
s.
Task
s.protected TaskEntry createTaskEntry(TaskSpec taskSpec, int nextTaskId, int id, int maxTaskFails, int maxTaskReplicas)
public int getId()
protected void replicaFinished(ReplicaExecutorResult result)
ReplicaExecutorResult
to
the finished state.
result
- The ReplicaExecutorResult
.protected void replicaFailed(ReplicaExecutorResult result)
ReplicaExecutorResult
to
the failed state.
result
- The ReplicaExecutorResult
.protected void replicaAborted(ReplicaExecutorResult result)
ReplicaExecutorResult
to
the aborted state.
result
- The ReplicaExecutorResult
.protected void replicaCancelled(ReplicaExecutorResult result)
ReplicaExecutorResult
to
the canceled state.
result
- The ReplicaExecutorResult
.protected void setCancelled()
public TaskEntry getTaskById(int taskId)
Task
by its identification.
taskId
- The Task
's identification.
Task
with the specified identificationpublic ExecutionStatus getStatus()
Job
state according its Task
s'
states.
Job
state.public java.util.List<TaskEntry> getTasks()
Job
'sTask
s.
List
containing all the Task
s.protected ReplicaEntry getNewReplica(TaskEntry task)
Replica
.
Replica
in case that a replication is
possible to be made, null
otherwise.public java.util.List<TaskEntry> getAvailableTasks()
Job
's available Task
s. If a
task can be replicated, it is included in this list.
List
containing all available Task
s.public JobSpec getJobSpec()
public java.lang.String getRequirements()
public java.lang.String getLabel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |