Package offlineProcessing
Class OfflineTaskManager
java.lang.Object
offlineProcessing.OfflineTaskManager
- All Implemented Interfaces:
TaskMonitor
Some global management of offline tasks / task groups.
- Author:
- dg50
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
addAvailableTasks
(OfflineTaskGroup taskGroup, PamDataBlock taskParentDataBlock) Add all available tasks from the system which use the given datablock as primary input.void
addCommandLineTask
(String taskLongName) Add a task listed in the command line when PAMGuard was started.findOfflineTask
(String taskLongName) Another way of finding offline tasks based on their long name.findOfflineTask
(String unitType, String unitName, String taskName) Find a registered task based on it's module type, module name and task name.findOfflineTask
(OfflineTask offlineTask) find a task with the same module type, module name and task name.Get a list of ALL offline tasks registered with all modules in all of PAMGUard.Get the status of jobs to pass back to the batch process controller.The list of tasks from the command line.static OfflineTaskManager
getOfflineTasks
(PamControlledUnit pamControlledUnit) Get a list of all tasks in the system which associate with the given PAMGuard modulegetOfflineTasks
(PamDataBlock taskParentDataBlock) Get a list of all tasks in the system which have the given parent data blockvoid
Called from controller at end of first data load when PAMGuard is in viewer batch processing mode.void
setTaskStatus
(TaskMonitorData taskMonitorData) void
Organise and start processing offline tasks created for batck processing.
-
Field Details
-
Constructor Details
-
Method Details
-
getManager
-
getAllOfflineTasks
Get a list of ALL offline tasks registered with all modules in all of PAMGUard.N.B. Many tasks won't be registered.
- Returns:
- list of all offline tasks
-
getOfflineTasks
Get a list of all tasks in the system which have the given parent data block- Parameters:
taskParentDataBlock
- parent data block for tasks- Returns:
- list of available tasks.
-
getOfflineTasks
Get a list of all tasks in the system which associate with the given PAMGuard module- Parameters:
pamControlledUnit
- parent PAMGuard module- Returns:
- list of available tasks.
-
addAvailableTasks
Add all available tasks from the system which use the given datablock as primary input.- Parameters:
taskGroup
- Task group to add tasks totaskParentDataBlock
- parent data block- Returns:
- number of tasks added
-
findOfflineTask
find a task with the same module type, module name and task name. This should be enough to uniquely identify every task.- Parameters:
offlineTask
-- Returns:
- matching task or null.
-
findOfflineTask
Find a registered task based on it's module type, module name and task name. This should be enough to uniquely identify every task.- Parameters:
unitType
-unitName
-taskName
-- Returns:
- matching task or null.
-
findOfflineTask
Another way of finding offline tasks based on their long name. This is basically the three names unitType, unitName and taskName concatenated together. Get's used for some task management such as passing batch processing instructions.- Parameters:
taskLongName
-- Returns:
- matching task or null.
-
addCommandLineTask
Add a task listed in the command line when PAMGuard was started.- Parameters:
taskLongName
-
-
getCommandLineTasks
The list of tasks from the command line.- Returns:
- the commandLineTasks
-
getBatchStatus
Get the status of jobs to pass back to the batch process controller.- Returns:
-
startBatchTasks
public void startBatchTasks()Organise and start processing offline tasks created for batck processing. -
launchOfflineBatchTasks
public void launchOfflineBatchTasks()Called from controller at end of first data load when PAMGuard is in viewer batch processing mode. Will launch a new thread to work it's way through all batch jobs. -
setTaskStatus
- Specified by:
setTaskStatus
in interfaceTaskMonitor
-