public class DefaultAggregateTaskExplorer extends Object implements AggregateTaskExplorer
| Constructor and Description |
|---|
DefaultAggregateTaskExplorer(DataSource dataSource,
DataflowTaskExecutionQueryDao taskExecutionQueryDao,
SchemaService schemaService,
AggregateExecutionSupport aggregateExecutionSupport,
TaskDefinitionReader taskDefinitionReader,
TaskDeploymentReader taskDeploymentReader) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findAll(org.springframework.data.domain.Pageable pageable)
Retrieves all the task executions within the pageable constraints sorted by start
date descending, taskExecution id descending.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findChildTaskExecutions(Collection<Long> parentIds,
String schemaTarget) |
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findChildTaskExecutions(long executionId,
String schemaTarget) |
org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findRunningTaskExecutions(String taskName,
org.springframework.data.domain.Pageable pageable)
Retrieve a collection of taskExecutions that have the task name provided.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findTaskExecutions(String taskName,
boolean completed)
Get a list of executions for a task by name and completion status.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findTaskExecutionsBeforeEndTime(String taskName,
Date endTime)
Get a list of executions for a task by name, completion status and end time.
|
org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findTaskExecutionsByName(String taskName,
org.springframework.data.domain.Pageable pageable)
Get a collection/page of executions.
|
Set<Long> |
getJobExecutionIdsByTaskExecutionId(long taskExecutionId,
String schemaTarget)
Returns a Set of JobExecution ids for the jobs that were executed within the scope
of the requested task.
|
org.springframework.cloud.dataflow.schema.AggregateTaskExecution |
getLatestTaskExecutionForTaskName(String taskName)
Returns the latest task execution for a given task name.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
getLatestTaskExecutionsByTaskNames(String... taskNames)
Returns a
List of the latest TaskExecution for 1 or more task
names. |
long |
getRunningTaskExecutionCount()
Retrieves current number of running task executions.
|
org.springframework.cloud.dataflow.schema.AggregateTaskExecution |
getTaskExecution(long executionId,
String schemaTarget)
find a task execution given an execution id and schema target.
|
org.springframework.cloud.dataflow.schema.AggregateTaskExecution |
getTaskExecutionByExternalExecutionId(String externalExecutionId,
String platform)
find a task execution given an external execution id and platform name.
|
long |
getTaskExecutionCount()
Retrieves current number of task executions.
|
long |
getTaskExecutionCountByTaskName(String taskName)
Get number of executions for a taskName.
|
Long |
getTaskExecutionIdByJobExecutionId(long jobExecutionId,
String schemaTarget)
Returns the id of the TaskExecution that the requested Spring Batch job execution
was executed within the context of.
|
List<String> |
getTaskNames()
Retrieve a list of available task names.
|
void |
setup() |
public DefaultAggregateTaskExplorer(DataSource dataSource, DataflowTaskExecutionQueryDao taskExecutionQueryDao, SchemaService schemaService, AggregateExecutionSupport aggregateExecutionSupport, TaskDefinitionReader taskDefinitionReader, TaskDeploymentReader taskDeploymentReader)
public org.springframework.cloud.dataflow.schema.AggregateTaskExecution getTaskExecution(long executionId,
String schemaTarget)
AggregateTaskExplorergetTaskExecution in interface AggregateTaskExplorerexecutionId - the task execution idschemaTarget - the schema targetpublic org.springframework.cloud.dataflow.schema.AggregateTaskExecution getTaskExecutionByExternalExecutionId(String externalExecutionId, String platform)
AggregateTaskExplorergetTaskExecutionByExternalExecutionId in interface AggregateTaskExplorerexternalExecutionId - the external execution idplatform - the platform namepublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findChildTaskExecutions(long executionId, String schemaTarget)
findChildTaskExecutions in interface AggregateTaskExplorerpublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findChildTaskExecutions(Collection<Long> parentIds, String schemaTarget)
findChildTaskExecutions in interface AggregateTaskExplorerpublic org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findRunningTaskExecutions(String taskName, org.springframework.data.domain.Pageable pageable)
AggregateTaskExplorerfindRunningTaskExecutions in interface AggregateTaskExplorertaskName - the name of the taskpageable - the constraints for the searchpublic List<String> getTaskNames()
AggregateTaskExplorergetTaskNames in interface AggregateTaskExplorerpublic long getTaskExecutionCountByTaskName(String taskName)
AggregateTaskExplorergetTaskExecutionCountByTaskName in interface AggregateTaskExplorertaskName - the name of the task to be searchedpublic long getTaskExecutionCount()
AggregateTaskExplorergetTaskExecutionCount in interface AggregateTaskExplorerpublic long getRunningTaskExecutionCount()
AggregateTaskExplorergetRunningTaskExecutionCount in interface AggregateTaskExplorerpublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findTaskExecutions(String taskName, boolean completed)
AggregateTaskExplorerfindTaskExecutions in interface AggregateTaskExplorertaskName - the name of the task to be searchedcompleted - whether to include only completed taskspublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findTaskExecutionsBeforeEndTime(String taskName, Date endTime)
AggregateTaskExplorerfindTaskExecutionsBeforeEndTime in interface AggregateTaskExplorertaskName - the name of the task to be searchedendTime - the tasks that ended before the endTimepublic org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findTaskExecutionsByName(String taskName, org.springframework.data.domain.Pageable pageable)
AggregateTaskExplorerfindTaskExecutionsByName in interface AggregateTaskExplorertaskName - the name of the task to be searchedpageable - the constraints for the searchpublic org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findAll(org.springframework.data.domain.Pageable pageable)
AggregateTaskExplorerfindAll in interface AggregateTaskExplorerpageable - the constraints for the searchpublic Long getTaskExecutionIdByJobExecutionId(long jobExecutionId, String schemaTarget)
AggregateTaskExplorergetTaskExecutionIdByJobExecutionId in interface AggregateTaskExplorerjobExecutionId - the id of the JobExecutionschemaTarget - the schema targetTaskExecutionpublic Set<Long> getJobExecutionIdsByTaskExecutionId(long taskExecutionId, String schemaTarget)
AggregateTaskExplorergetJobExecutionIdsByTaskExecutionId in interface AggregateTaskExplorertaskExecutionId - id of the TaskExecutionschemaTarget - the schema targetSet of the ids of the job executions executed within the
task.public List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> getLatestTaskExecutionsByTaskNames(String... taskNames)
AggregateTaskExplorerList of the latest TaskExecution for 1 or more task
names.
Latest is defined by the most recent start time. A TaskExecution does not
have to be finished (The results may including pending TaskExecutions).
It is theoretically possible that a TaskExecution with the same name to
have more than 1 TaskExecution for the exact same start time. In that case
the TaskExecution with the highest Task Execution ID is returned.
This method will not consider end times in its calculations. Thus, when a task
execution A starts after task execution B but finishes BEFORE task
execution A, then task execution B is being returned.
getLatestTaskExecutionsByTaskNames in interface AggregateTaskExplorertaskNames - At least 1 task name must be providedpublic org.springframework.cloud.dataflow.schema.AggregateTaskExecution getLatestTaskExecutionForTaskName(String taskName)
AggregateTaskExplorerAggregateTaskExplorer.getLatestTaskExecutionsByTaskNames(String...)
but will only return a single result.getLatestTaskExecutionForTaskName in interface AggregateTaskExplorertaskName - Must not be null or emptyAggregateTaskExplorer.getLatestTaskExecutionsByTaskNames(String...)@PostConstruct public void setup()
Copyright © 2023 Pivotal Software, Inc.. All rights reserved.