Package offlineProcessing
Class OfflineTaskManager
java.lang.Object
offlineProcessing.OfflineTaskManager
Some global management of offline tasks / task groups.
- Author:
- dg50
-
Field Summary
-
Constructor Summary
-
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
registerTask
(OfflineTask offlineTask) Register a task in the global list.
-
Field Details
-
commandFlag
- See Also:
-
commandLineTasks
-
-
Constructor Details
-
OfflineTaskManager
public OfflineTaskManager()
-
-
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
-
registerTask
Register a task in the global list. It's possible some tasks might get recreated, in which case when registered they will replace the previous one This will cause trouble if two separate tasks have the same name, but that should not be possible.- Parameters:
offlineTask
-
-
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:
-