|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DestructionManager
Manages the automatic destruction of given jobs.
Any job has a field named: destruction. It indicates when the job must be destroyed. Remember that destroying a job means clearing all its resources (stopping it, deleting its result, ...) and removing it from its jobs list.
Each job must warn its jobs list of any change of its destruction time,
so that the jobs list can update the destruction manager with the method update(AbstractJob)
.
Once the destruction time of a job is reached, it must be removed from this manager and
from its jobs list (see JobList.destroyJob(String)
).
Note:
DefaultDestructionManager
is a default implementation of this interface.
It is used by default by any subclass of AbstractUWS
and JobList
.
DefaultDestructionManager
Method Summary | |
---|---|
int |
getNbJobsToDestroy()
Gets the total number of jobs planned to be destroyed. |
java.util.Date |
getNextDestruction()
Gets the destruction date/time of the job currently planned for destruction. |
java.lang.String |
getNextJobToDestroy()
Gets the ID of the job currently planned for destruction. |
boolean |
isRunning()
Indicates whether a job is currently planned to be destroyed. |
void |
refresh()
Refresh the list of jobs to destroy. |
void |
remove(AbstractJob job)
Removes the given job from this manager. |
void |
update(AbstractJob job)
Updates the list of jobs to destroy with the given job. |
Method Detail |
---|
boolean isRunning()
java.util.Date getNextDestruction()
java.lang.String getNextJobToDestroy()
int getNbJobsToDestroy()
void refresh()
Refresh the list of jobs to destroy.
It may stop if there is not any more job to destroy. It may change the currently planned job if another job must be destroyed before it.
void update(AbstractJob job)
Updates the list of jobs to destroy with the given job.
refresh()
).
job
- The job whose the destruction time may have changed.void remove(AbstractJob job)
job
- The job to remove.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |