public class CollectJob extends org.eclipse.core.runtime.jobs.Job implements CollectListener, QuickstatProgress
Modifier and Type | Field and Description |
---|---|
protected int |
bladeProgress |
protected boolean |
canceled |
protected ClifAppFacade |
clifApp |
protected int |
fullProgress |
protected int |
fullSize |
protected org.eclipse.core.runtime.IProgressMonitor |
monitor |
Constructor and Description |
---|
CollectJob(ClifAppFacade clifApp,
java.lang.String[] bladesId)
Creates a new job for collecting measures of the latest test, and
generating a simple statistical report.
|
Modifier and Type | Method and Description |
---|---|
void |
bladeCollectStart(java.lang.String bladeId,
long size)
Called before collecting test results from a blade.
|
void |
collectStart(java.lang.String testId,
long size)
Called at the collect beginning.
|
void |
done()
Called when the full collect is complete.
|
boolean |
isCanceled()
Called an arbitrarily number of times at arbitrary moments during a collect
to ensure the collect must go on or be canceled.
|
boolean |
isCanceled(java.lang.String bladeId)
Called an arbitrarily number of times at arbitrary moments during a collect
to ensure the collect must go on or be canceled for the given blade.
|
void |
progress(java.lang.String bladeId,
long done)
Called an arbitrary number of times when collecting test results from a blade
to give current progress
|
void |
quickstatComplete()
Called to indicate that the statistical report computation
is complete.
|
boolean |
quickstatIsCanceled()
Called to check whether the computation should be canceled.
|
void |
quickstatProgress(java.lang.String bladeId,
int done)
Called to give the amount of work achieved up to now,
as well as a description of current subtask.
|
void |
quickstatStarted(java.lang.String testId,
int size)
Called to give the target test name, and an estimation
of the total amount of computation
|
protected org.eclipse.core.runtime.IStatus |
run(org.eclipse.core.runtime.IProgressMonitor monitor) |
addJobChangeListener, belongsTo, cancel, canceling, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, wakeUp, wakeUp
protected org.eclipse.core.runtime.IProgressMonitor monitor
protected boolean canceled
protected int fullSize
protected int fullProgress
protected int bladeProgress
protected ClifAppFacade clifApp
public CollectJob(ClifAppFacade clifApp, java.lang.String[] bladesId)
clifApp
- clifApp used by this testbladesId
- blades id to collectprotected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
run
in class org.eclipse.core.runtime.jobs.Job
public void collectStart(java.lang.String testId, long size)
CollectListener
collectStart
in interface CollectListener
testId
- the identifier of the test to be collectedsize
- the total number of bytes to be collectedpublic void bladeCollectStart(java.lang.String bladeId, long size)
CollectListener
bladeCollectStart
in interface CollectListener
bladeId
- the identifier of the blade about to be collectedsize
- the total number of bytes to collect from the given bladepublic void progress(java.lang.String bladeId, long done)
CollectListener
progress
in interface CollectListener
bladeId
- the identifier of the blade test results are being collected fromdone
- number of bytes already collected (cannot decrease, nor be
greater then the size given in the preliminary bladeCollectStart call)public void done()
CollectListener
done
in interface CollectListener
public boolean isCanceled()
CollectListener
isCanceled
in interface CollectListener
public boolean isCanceled(java.lang.String bladeId)
CollectListener
isCanceled
in interface CollectListener
bladeId
- the identifier of the considered bladepublic void quickstatStarted(java.lang.String testId, int size)
QuickstatProgress
quickstatStarted
in interface QuickstatProgress
testId
- the target test namesize
- the estimated amount of workpublic void quickstatProgress(java.lang.String bladeId, int done)
QuickstatProgress
quickstatProgress
in interface QuickstatProgress
public void quickstatComplete()
QuickstatProgress
quickstatComplete
in interface QuickstatProgress
public boolean quickstatIsCanceled()
QuickstatProgress
quickstatIsCanceled
in interface QuickstatProgress