Package offlineProcessing
Class DataCopyTask<T extends PamDataUnit>
java.lang.Object
offlineProcessing.OfflineTask<T>
offlineProcessing.DataCopyTask<T>
- Type Parameters:
T
-
- Direct Known Subclasses:
DifarDataCopyTask
Generic class for copying data from binary data files to database files.
This will generally use the default SqlLogging and binaryDataSources which are already
set in the datablock so copy data from the binary to the database.
- Author:
- Doug Gillespie
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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.getName()
void
Called when processing of loaded data, or each map point worth of data, is complete.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
Called at the start of the thread which executes this task.boolean
processDataUnit
(T dataUnit) Process a single data unit.void
setBinaryDataSource
(BinaryDataSource binaryDataSource) void
setSqlLogging
(SQLLogging sqlLogging) Methods inherited from class offlineProcessing.OfflineTask
addAffectedDataBlock, addRequiredDataBlock, addRequiredDataBlock, addRequiredDataBlock, callSettings, completeTask, deleteOldData, deleteOldOutput, getAffectedBlocksList, getAffectedDataBlock, getDataBlock, getLongName, getNumAffectedDataBlocks, getNumRequiredDataBlocks, getOfflineTaskGroup, getRequiredDataBlock, getTaskControlledUnit, getUnitName, getUnitType, hasSettings, isDoRun, setDoRun, setOfflineTaskGroup, setParentDataBlock
-
Constructor Details
-
DataCopyTask
- Parameters:
pamDataBlock
-
-
-
Method Details
-
getSqlLogging
- Returns:
- the sqlLogging
-
setSqlLogging
- Parameters:
sqlLogging
- the sqlLogging to set
-
getBinaryDataSource
- Returns:
- the binaryDataSource
-
setBinaryDataSource
- Parameters:
binaryDataSource
- the binaryDataSource to set
-
getName
- Specified by:
getName
in classOfflineTask<T extends PamDataUnit>
- Returns:
- a name for the task, to be displayed in the dialog.
-
newDataLoad
Description copied from class:OfflineTask
Called when new data are loaded for offline processing (or once at the start of processing loaded data).- Specified by:
newDataLoad
in classOfflineTask<T extends PamDataUnit>
- Parameters:
startTime
- start time of loaded dataendTime
- end time of loaded data
-
prepareTask
public void prepareTask()Description copied from class:OfflineTask
Called at the start of the thread which executes this task.- Overrides:
prepareTask
in classOfflineTask<T extends PamDataUnit>
-
processDataUnit
Description copied from class:OfflineTask
Process a single data unit.- Specified by:
processDataUnit
in classOfflineTask<T extends PamDataUnit>
- Returns:
- true if the data unit has changed in some way so that it will need re-writing to it's binary file or database.
-
canRun
public boolean canRun()Description copied from class:OfflineTask
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.- Overrides:
canRun
in classOfflineTask<T extends PamDataUnit>
- Returns:
- true if it's possible to run the task.
-
loadedDataComplete
public void loadedDataComplete()Description copied from class:OfflineTask
Called when processing of loaded data, or each map point worth of data, is complete.- Specified by:
loadedDataComplete
in classOfflineTask<T extends PamDataUnit>
-