|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ourgrid.mygrid.scheduler.jobmanager.AbstractJobManager
public abstract class AbstractJobManager
Constructor Summary | |
---|---|
AbstractJobManager()
|
Method Summary | |
---|---|
void |
addJob(int jobId,
JobSpec jobSpec)
Adds a new Job . |
void |
addNewListener(JobManagerListenerRemote newListener)
|
ReplicaEntry |
createNewReplica(TaskEntry task)
|
protected abstract void |
realAddJob(int jobId,
JobSpec jobSpec)
|
protected abstract ReplicaEntry |
realCreateNewReplica(TaskEntry task)
|
protected abstract void |
realRemoveJob(int jobId)
|
protected abstract void |
realReplicaAborted(ReplicaExecutorResult result)
|
protected abstract void |
realReplicaCanceled(ReplicaExecutorResult result)
|
protected abstract void |
realReplicaFailed(ReplicaExecutorResult result)
|
protected abstract void |
realReplicaFinished(ReplicaExecutorResult result)
|
protected abstract void |
realReplicaRunning(ReplicaEntry replica,
GumID gumID)
|
protected abstract void |
realSetCanceled(int jobId)
|
protected abstract void |
realShutdown()
|
void |
removeJob(int jobId)
Remove the information about the specified job |
void |
removeListener(JobManagerListenerRemote listener)
|
void |
replicaAborted(ReplicaExecutorResult result)
Sets the Replica state to aborted. |
void |
replicaCanceled(ReplicaExecutorResult result)
Sets the Replica state to canceled. |
void |
replicaFailed(ReplicaExecutorResult result)
Sets the Replica state to failed. |
void |
replicaFinished(ReplicaExecutorResult result)
Sets the Replica state to finished. |
void |
replicaRunning(ReplicaEntry replica,
GumID gumID)
|
void |
setCanceled(int jobId)
Sets the given job as canceled. |
void |
shutdown()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.ourgrid.mygrid.scheduler.jobmanager.JobManager |
---|
addJobInterested, cleanFinishedJobs, clonedJobList, getJobById, getJobState, jobList, setMaxFails, setMaxReplicas |
Constructor Detail |
---|
public AbstractJobManager()
Method Detail |
---|
public void addJob(int jobId, JobSpec jobSpec)
JobManager
Job
.
addJob
in interface JobManager
jobSpec
- The job specification.public ReplicaEntry createNewReplica(TaskEntry task)
createNewReplica
in interface JobManager
protected abstract ReplicaEntry realCreateNewReplica(TaskEntry task)
public void replicaFinished(ReplicaExecutorResult result)
JobManager
Replica
state to finished. It also
notifies JobInteresteds
case it is necessary.
replicaFinished
in interface JobManager
result
- The ReplicaExecutorResult
.public void replicaFailed(ReplicaExecutorResult result)
JobManager
Replica
state to failed. It also notifies
JobInteresteds
case it is necessary.
replicaFailed
in interface JobManager
result
- The ReplicaExecutorResult
.public void replicaAborted(ReplicaExecutorResult result)
JobManager
Replica
state to aborted. It also
notifies JobInteresteds
case it is necessary.
replicaAborted
in interface JobManager
result
- The ReplicaExecutorResult
.public void replicaCanceled(ReplicaExecutorResult result)
JobManager
Replica
state to canceled. It also
notifies JobInteresteds
case it is necessary.
replicaCanceled
in interface JobManager
result
- The ReplicaExecutorResult
.public void setCanceled(int jobId) throws JobNotFoundException, JobCouldNotBeCancelledException
JobManager
setCanceled
in interface JobManager
jobId
- The job identification
JobNotFoundException
- when the job was not found
JobCouldNotBeCancelledException
- when the job could not be
canceledpublic void removeJob(int jobId) throws JobCannotBeRemovedException
JobManager
removeJob
in interface JobManager
JobCannotBeRemovedException
public void replicaRunning(ReplicaEntry replica, GumID gumID)
replicaRunning
in interface JobManager
protected abstract void realReplicaRunning(ReplicaEntry replica, GumID gumID)
public void shutdown()
shutdown
in interface JobManager
protected abstract void realShutdown()
public void addNewListener(JobManagerListenerRemote newListener)
addNewListener
in interface JobManager
public void removeListener(JobManagerListenerRemote listener)
removeListener
in interface JobManager
protected abstract void realAddJob(int jobId, JobSpec jobSpec)
protected abstract void realReplicaFinished(ReplicaExecutorResult result)
protected abstract void realReplicaFailed(ReplicaExecutorResult result)
protected abstract void realReplicaAborted(ReplicaExecutorResult result)
protected abstract void realReplicaCanceled(ReplicaExecutorResult result)
protected abstract void realSetCanceled(int jobId) throws JobNotFoundException, JobCouldNotBeCancelledException
JobNotFoundException
JobCouldNotBeCancelledException
protected abstract void realRemoveJob(int jobId) throws JobCannotBeRemovedException
JobCannotBeRemovedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |