/**
* Returns a TaskEntry for the given task. These are cached
* after their first creation.
*/
public TaskEntry getTaskEntry(String taskId) {
TaskEntry entry = (TaskEntry)entries.get(taskId);
if (entry == null) {
ModuleFunction modFunc = getModuleFunction(taskId);
if (modFunc == null)
return null;
synchronized(entries) {
entry = (TaskEntry)entries.get(taskId);
if (entry == null) {
TaskDescription desc = getTaskDescription(modFunc);
GridpScriptTask task = new GridpScriptTask(modFunc.getFunction(), runScriptTask);
entry = new TaskEntry(taskId, task, desc);
entries.put(taskId, entry);
}
}