public class SimpleTaskExplorer extends Object implements TaskExplorer
| Constructor and Description |
|---|
SimpleTaskExplorer(TaskExecutionDaoFactoryBean taskExecutionDaoFactoryBean) |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.data.domain.Page<TaskExecution> |
findAll(org.springframework.data.domain.Pageable pageable)
Retrieves all the task executions within the pageable constraints sorted by start
date descending, taskExecution id descending.
|
org.springframework.data.domain.Page<TaskExecution> |
findRunningTaskExecutions(String taskName,
org.springframework.data.domain.Pageable pageable)
Retrieve a collection of taskExecutions that have the task name provided.
|
org.springframework.data.domain.Page<TaskExecution> |
findTaskExecutionsByName(String taskName,
org.springframework.data.domain.Pageable pageable)
Get a collection/page of executions.
|
Set<Long> |
getJobExecutionIdsByTaskExecutionId(long taskExecutionId)
Returns a Set of JobExecution ids for the jobs that were executed within the scope
of the requested task.
|
TaskExecution |
getLatestTaskExecutionForTaskName(String taskName)
Returns the latest task execution for a given task name.
|
List<TaskExecution> |
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.
|
TaskExecution |
getTaskExecution(long executionId)
Retrieve a
TaskExecution by its id. |
long |
getTaskExecutionCount()
Retrieves current number of task executions.
|
long |
getTaskExecutionCountByTaskName(String taskName)
Get number of executions for a taskName.
|
Long |
getTaskExecutionIdByJobExecutionId(long jobExecutionId)
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.
|
public SimpleTaskExplorer(TaskExecutionDaoFactoryBean taskExecutionDaoFactoryBean)
public TaskExecution getTaskExecution(long executionId)
TaskExplorerTaskExecution by its id.getTaskExecution in interface TaskExplorerexecutionId - the task execution idTaskExecution with this id, or null if not foundpublic org.springframework.data.domain.Page<TaskExecution> findRunningTaskExecutions(String taskName, org.springframework.data.domain.Pageable pageable)
TaskExplorerfindRunningTaskExecutions in interface TaskExplorertaskName - the name of the taskpageable - the constraints for the searchpublic List<String> getTaskNames()
TaskExplorergetTaskNames in interface TaskExplorerpublic long getTaskExecutionCountByTaskName(String taskName)
TaskExplorergetTaskExecutionCountByTaskName in interface TaskExplorertaskName - the name of the task to be searchedpublic long getTaskExecutionCount()
TaskExplorergetTaskExecutionCount in interface TaskExplorerpublic long getRunningTaskExecutionCount()
TaskExplorergetRunningTaskExecutionCount in interface TaskExplorerpublic org.springframework.data.domain.Page<TaskExecution> findTaskExecutionsByName(String taskName, org.springframework.data.domain.Pageable pageable)
TaskExplorerfindTaskExecutionsByName in interface TaskExplorertaskName - the name of the task to be searchedpageable - the constraints for the searchpublic org.springframework.data.domain.Page<TaskExecution> findAll(org.springframework.data.domain.Pageable pageable)
TaskExplorerfindAll in interface TaskExplorerpageable - the constraints for the searchpublic Long getTaskExecutionIdByJobExecutionId(long jobExecutionId)
TaskExplorergetTaskExecutionIdByJobExecutionId in interface TaskExplorerjobExecutionId - the id of the JobExecutionTaskExecutionpublic Set<Long> getJobExecutionIdsByTaskExecutionId(long taskExecutionId)
TaskExplorergetJobExecutionIdsByTaskExecutionId in interface TaskExplorertaskExecutionId - id of the TaskExecutionSet of the ids of the job executions executed within the
task.public List<TaskExecution> getLatestTaskExecutionsByTaskNames(String... taskNames)
TaskExplorerList 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 TaskExplorertaskNames - At least 1 task name must be providedpublic TaskExecution getLatestTaskExecutionForTaskName(String taskName)
TaskExplorerTaskExplorer.getLatestTaskExecutionsByTaskNames(String...)
but will only return a single result.getLatestTaskExecutionForTaskName in interface TaskExplorertaskName - Must not be null or emptyTaskExplorer.getLatestTaskExecutionsByTaskNames(String...)Copyright © 2019 Pivotal Software, Inc.. All rights reserved.