@Transactional public class DefaultTaskExecutionService extends Object implements TaskExecutionService
TaskExecutionService
interface. Provide service
methods for Tasks.Modifier and Type | Field and Description |
---|---|
protected org.springframework.cloud.dataflow.audit.service.AuditRecordService |
auditRecordService |
static String |
COMMAND_LINE_ARGS |
static String |
TASK_DEFINITION_DSL_TEXT |
static String |
TASK_DEPLOYMENT_PROPERTIES |
static String |
TASK_PLATFORM_NAME |
Constructor and Description |
---|
DefaultTaskExecutionService(LauncherRepository launcherRepository,
org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService,
org.springframework.cloud.task.repository.TaskRepository taskRepository,
TaskExecutionInfoService taskExecutionInfoService,
TaskDeploymentRepository taskDeploymentRepository,
TaskExecutionCreationService taskExecutionRepositoryService,
TaskAppDeploymentRequestCreator taskAppDeploymentRequestCreator)
Initializes the
DefaultTaskExecutionService . |
Modifier and Type | Method and Description |
---|---|
long |
executeTask(String taskName,
Map<String,String> taskDeploymentProperties,
List<String> commandLineArgs)
Execute a task with the provided task name and optional runtime properties.
|
protected void |
updateExternalExecutionId(long executionId,
String taskLaunchId) |
protected final org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService
public static final String TASK_DEFINITION_DSL_TEXT
public static final String TASK_DEPLOYMENT_PROPERTIES
public static final String COMMAND_LINE_ARGS
public static final String TASK_PLATFORM_NAME
public DefaultTaskExecutionService(LauncherRepository launcherRepository, org.springframework.cloud.dataflow.audit.service.AuditRecordService auditRecordService, org.springframework.cloud.task.repository.TaskRepository taskRepository, TaskExecutionInfoService taskExecutionInfoService, TaskDeploymentRepository taskDeploymentRepository, TaskExecutionCreationService taskExecutionRepositoryService, TaskAppDeploymentRequestCreator taskAppDeploymentRequestCreator)
DefaultTaskExecutionService
.launcherRepository
- the repository of task launcher used to launch task apps.auditRecordService
- the audit record servicetaskRepository
- the repository to use for accessing and updating task executionstaskDeploymentRepository
- the repository to track task deploymenttaskExecutionInfoService
- the service used to setup a task executiontaskExecutionRepositoryService
- the service used to create the task executionpublic long executeTask(String taskName, Map<String,String> taskDeploymentProperties, List<String> commandLineArgs)
TaskExecutionService
executeTask
in interface TaskExecutionService
taskName
- Name of the task. Must not be null or empty.taskDeploymentProperties
- Optional deployment properties. Must not be null.commandLineArgs
- Optional runtime commandline argumentsprotected void updateExternalExecutionId(long executionId, String taskLaunchId)
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.