1 package org
.argeo
.slc
.runtime
;
3 import java
.util
.concurrent
.ArrayBlockingQueue
;
4 import java
.util
.concurrent
.BlockingQueue
;
6 import org
.argeo
.api
.slc
.execution
.ExecutionProcess
;
7 import org
.argeo
.api
.slc
.execution
.ExecutionStep
;
9 /** The thread group attached to a given {@link SlcExecution}. */
10 public class ProcessThreadGroup
extends ThreadGroup
{
11 // private final Authentication authentication;
12 private final static Integer STEPS_BUFFER_CAPACITY
= 5000;
14 private BlockingQueue
<ExecutionStep
> steps
= new ArrayBlockingQueue
<ExecutionStep
>(
15 STEPS_BUFFER_CAPACITY
);
17 private Boolean hadAnError
= false;
19 public ProcessThreadGroup(ExecutionProcess executionProcess
) {
20 super("SLC Process #" + executionProcess
.getUuid() + " thread group");
21 // this.authentication = SecurityContextHolder.getContext()
22 // .getAuthentication();
25 // public Authentication getAuthentication() {
26 // return authentication;
29 public void dispatchAddStep(ExecutionStep step
) {
30 // ExecutionProcess slcProcess = processThread.getProcess();
31 // List<ExecutionStep> steps = new ArrayList<ExecutionStep>();
33 // TODO clarify why we don't dispatch steps, must be a reason
34 // dispatchAddSteps(steps);
35 // slcProcess.addSteps(steps);
36 if (step
.getType().equals(ExecutionStep
.ERROR
))
41 // public void dispatchAddSteps(List<ExecutionStep> steps) {
42 // ExecutionProcess slcProcess = processThread.getProcess();
43 // executionModulesManager.dispatchAddSteps(slcProcess, steps);
46 public BlockingQueue
<ExecutionStep
> getSteps() {
50 public Boolean
hadAnError() {