net.sourceforge.java.util.jobs
Class IdleJobStatusReaper

java.lang.Object
  extended bynet.sourceforge.java.util.jobs.Job
      extended bynet.sourceforge.java.util.jobs.IdleJobStatusReaper
All Implemented Interfaces:
IJob, IRunnableWithProgress

public class IdleJobStatusReaper
extends Job

Reapes idle JobStatus instances found in a JobStatusTableContentProvider whose idle time is greater than the time specified in DEFAULT_IDLE_TIME.

Author:
Sebastian Machhausen

Field Summary
private  JobStatusTableContentProvider contentProvider
           The JobStatusTableContentProvider in which to look for idle JobStatus instances
private static long DEFAULT_IDLE_TIME
           The default time in milliseconds that an JobStatus can be idle before it gets reaped.
 
Fields inherited from class net.sourceforge.java.util.jobs.Job
 
Fields inherited from interface net.sourceforge.java.util.jobs.IJob
HIGH_PRIORITY, LOW_PRIORITY, NORM_PRIORITY
 
Constructor Summary
IdleJobStatusReaper(JobStatusTableContentProvider contentProvider)
           Creates a new IdleJobStatusReaper instance that reapes idle JobStatus instances contained in the specified JobStatusTableContentProvider.
 
Method Summary
 void run(IProgressMonitor monitor)
           Executes this IdleJobStatusReaper.
 
Methods inherited from class net.sourceforge.java.util.jobs.Job
cancel, done, getException, getJobManager, getName, getPriority, getStatus, getThread, isCanceled, join, setException, setJobManager, setName, setPriority, setThread, start, started, statusChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IDLE_TIME

private static final long DEFAULT_IDLE_TIME

The default time in milliseconds that an JobStatus can be idle before it gets reaped.

See Also:
Constant Field Values

contentProvider

private JobStatusTableContentProvider contentProvider

The JobStatusTableContentProvider in which to look for idle JobStatus instances

Constructor Detail

IdleJobStatusReaper

public IdleJobStatusReaper(JobStatusTableContentProvider contentProvider)

Creates a new IdleJobStatusReaper instance that reapes idle JobStatus instances contained in the specified JobStatusTableContentProvider.

Parameters:
contentProvider - the JobStatusTableContentProvider in which to look for idle JobStatus instances
Method Detail

run

public void run(IProgressMonitor monitor)
         throws InvocationTargetException,
                InterruptedException

Executes this IdleJobStatusReaper. It reapes all JobStatus objects which are idle longer than the time specified in DEFAULT_IDLE_TIME.

Parameters:
monitor - the IProgressMonitor to use for reporting progress
Throws:
InvocationTargetException
InterruptedException
See Also:
IRunnableWithProgress.run(org.eclipse.core.runtime.IProgressMonitor)