@ApplicationScoped public class PipelineExecutorTaskManagerImpl extends Object implements PipelineExecutorTaskManager
Modifier and Type | Class and Description |
---|---|
protected static class |
PipelineExecutorTaskManagerImpl.TaskEntry |
PipelineExecutorTaskManager.ExecutionMode
Modifier and Type | Field and Description |
---|---|
protected Map<String,PipelineExecutorTaskManagerImpl.TaskEntry> |
currentTasks |
protected static int |
DEFAULT_THREAD_POOL_SIZE |
protected ExecutorService |
executor |
protected List<PipelineEventListener> |
externalListeners |
protected Map<String,Future<?>> |
futureTaskMap |
protected PipelineEventListener |
localListener |
protected PipelineExecutor |
pipelineExecutor |
protected PipelineExecutorRegistry |
pipelineExecutorRegistry |
protected PipelineRegistry |
pipelineRegistry |
protected PipelineExecutorTaskManagerImplHelper |
taskManagerHelper |
protected static String |
THREAD_POOL_SIZE_PROPERTY_NAME |
Constructor and Description |
---|
PipelineExecutorTaskManagerImpl() |
PipelineExecutorTaskManagerImpl(PipelineRegistry pipelineRegistry,
javax.enterprise.inject.Instance<ConfigExecutor> configExecutorInstance,
javax.enterprise.inject.Instance<PipelineEventListener> pipelineEventListenerInstance,
PipelineExecutorRegistry pipelineExecutorRegistry) |
Modifier and Type | Method and Description |
---|---|
void |
delete(String taskId)
Deletes a pipeline executor task that is in FINISHED, STOPPED or ERROR status.
|
protected void |
destroy() |
void |
destroy(String taskId)
Destroys a pipeline executor task that was launched in ASYNCHRONOUS independently of the execution status.
|
String |
execute(PipelineExecutorTaskDef taskDef,
PipelineExecutorTaskManager.ExecutionMode executionMode)
Starts the execution of a task based on the taskDef provided as parameter.
|
protected void |
init() |
void |
stop(String taskId)
Stops a pipeline executor task that was launched in ASYNCHRONOUS mode that is in RUNNING or SCHEDULED status.
|
protected static final int DEFAULT_THREAD_POOL_SIZE
protected static final String THREAD_POOL_SIZE_PROPERTY_NAME
protected ExecutorService executor
protected List<PipelineEventListener> externalListeners
protected PipelineExecutor pipelineExecutor
protected final Map<String,PipelineExecutorTaskManagerImpl.TaskEntry> currentTasks
protected PipelineExecutorRegistry pipelineExecutorRegistry
protected PipelineRegistry pipelineRegistry
protected PipelineEventListener localListener
protected PipelineExecutorTaskManagerImplHelper taskManagerHelper
public PipelineExecutorTaskManagerImpl()
@Inject public PipelineExecutorTaskManagerImpl(PipelineRegistry pipelineRegistry, javax.enterprise.inject.Instance<ConfigExecutor> configExecutorInstance, javax.enterprise.inject.Instance<PipelineEventListener> pipelineEventListenerInstance, PipelineExecutorRegistry pipelineExecutorRegistry)
@PostConstruct protected void init()
@PreDestroy protected void destroy()
public String execute(PipelineExecutorTaskDef taskDef, PipelineExecutorTaskManager.ExecutionMode executionMode)
PipelineExecutorTaskManager
execute
in interface PipelineExecutorTaskManager
taskDef
- a task definition to be executed.executionMode
- indicates if the task should be executed in synchronous or asynchronous mode.PipelineExecutorTaskDef
public void stop(String taskId) throws PipelineExecutorException
PipelineExecutorTaskManager
stop
in interface PipelineExecutorTaskManager
taskId
- the id of the task to stop.PipelineExecutorException
- throws exceptions when a task that fulfil the conditions couldn't be found.public void destroy(String taskId) throws PipelineExecutorException
PipelineExecutorTaskManager
destroy
in interface PipelineExecutorTaskManager
taskId
- the id of the task to be destroyed.PipelineExecutorException
- throws exceptions when a task that fulfil the conditions couldn't be found.public void delete(String taskId) throws PipelineExecutorException
PipelineExecutorTaskManager
delete
in interface PipelineExecutorTaskManager
taskId
- the id of the task to be deleted.PipelineExecutorException
- throws exceptions when a task that fulfil the conditions couldn't be found.Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.