public abstract class OfflineTask<T extends PamDataUnit>
extends java.lang.Object
OLProcessDialog
Constructor and Description |
---|
OfflineTask() |
Modifier and Type | Method and Description |
---|---|
void |
addAffectedDataBlock(PamDataBlock dataBlock)
Add an affected data block.
|
void |
addRequiredDataBlock(PamDataBlock dataBlock)
Add a required data block.
|
boolean |
callSettings()
Call any task specific settings
|
boolean |
canRun()
can the task be run ? This will generally
be true, but may be false if the task is dependent on
some other module which may not be present.
|
void |
completeTask()
Called at the end of the thread which executes this task.
|
void |
deleteOldOutput(long currentViewDataStart,
long currentViewDataEnd,
OfflineDataMapPoint mapPoint)
Delete database outptut data in the list of output datablocks.
|
PamDataBlock |
getAffectedDataBlock(int iBlock)
A data block required to run this task.
|
PamDataBlock<T> |
getDataBlock()
(Not sure what happens if we need multiple data units to
complete a task !)
|
abstract java.lang.String |
getName() |
int |
getNumAffectedDataBlocks() |
int |
getNumRequiredDataBlocks() |
OfflineTaskGroup |
getOfflineTaskGroup() |
PamDataBlock |
getRequiredDataBlock(int iBlock)
A data block required to run this task.
|
boolean |
hasSettings()
task has settings which can be called
|
boolean |
isDoRun()
return whether or not the task SHOULD be run - i.e.
|
abstract void |
loadedDataComplete()
Called when processing of loaded data, or each map point worth of data,
is complete.
|
abstract void |
newDataLoad(long startTime,
long endTime,
OfflineDataMapPoint mapPoint)
Called when new data are loaded for offline processing
(or once at the start of processing loaded data).
|
void |
prepareTask()
Called at the start of the thread which executes this task.
|
abstract boolean |
processDataUnit(T dataUnit)
Process a single data unit.
|
void |
setDoRun(boolean doRun)
Set whether or not this task within a taskGroup should be run.
|
void |
setOfflineTaskGroup(OfflineTaskGroup offlineTaskGroup) |
void |
setParentDataBlock(PamDataBlock dataBlock) |
public PamDataBlock<T> getDataBlock()
public void setParentDataBlock(PamDataBlock dataBlock)
dataBlock
- the dataBlock to setpublic abstract java.lang.String getName()
public boolean hasSettings()
public boolean callSettings()
public boolean canRun()
public abstract boolean processDataUnit(T dataUnit)
public abstract void newDataLoad(long startTime, long endTime, OfflineDataMapPoint mapPoint)
startTime
- start time of loaded dataendTime
- end time of loaded datapublic abstract void loadedDataComplete()
public void addRequiredDataBlock(PamDataBlock dataBlock)
dataBlock
- required data block.public int getNumRequiredDataBlocks()
public PamDataBlock getRequiredDataBlock(int iBlock)
iBlock
- block indexpublic void addAffectedDataBlock(PamDataBlock dataBlock)
dataBlock
- affected data block.public int getNumAffectedDataBlocks()
public PamDataBlock getAffectedDataBlock(int iBlock)
iBlock
- block indexpublic boolean isDoRun()
public void setDoRun(boolean doRun)
doRun
- the doRun to setpublic OfflineTaskGroup getOfflineTaskGroup()
public void setOfflineTaskGroup(OfflineTaskGroup offlineTaskGroup)
offlineTaskGroup
- the offlineTaskGroup to setpublic void deleteOldOutput(long currentViewDataStart, long currentViewDataEnd, OfflineDataMapPoint mapPoint)
currentViewDataStart
- currentViewDataEnd
- mapPoint
- public void prepareTask()
public void completeTask()