Interface DataflowTaskExplorer

All Known Implementing Classes:
DefaultDataflowTaskExplorer

public interface DataflowTaskExplorer
Provides for exploring tasks for multiple schema targets.
Author:
Corneil du Plessis
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.data.domain.Page<org.springframework.cloud.task.repository.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.
    List<org.springframework.cloud.task.repository.TaskExecution>
    findChildTaskExecutions(long executionId)
     
    List<org.springframework.cloud.task.repository.TaskExecution>
     
    org.springframework.data.domain.Page<org.springframework.cloud.task.repository.TaskExecution>
    findRunningTaskExecutions(String taskName, org.springframework.data.domain.Pageable pageable)
    Retrieve a collection of taskExecutions that have the task name provided.
    List<org.springframework.cloud.task.repository.TaskExecution>
    findTaskExecutions(String taskName, boolean onlyCompleted)
    Get a list of executions for a task by name and completion status.
    List<org.springframework.cloud.task.repository.TaskExecution>
    Get a list of executions for a task by name, completion status and end time.
    org.springframework.data.domain.Page<org.springframework.cloud.task.repository.TaskExecution>
    findTaskExecutionsByName(String taskName, org.springframework.data.domain.Pageable pageable)
    Get a collection/page of executions.
    Returns a Set of JobExecution ids for the jobs that were executed within the scope of the requested task.
    org.springframework.cloud.task.repository.TaskExecution
    Returns the latest task execution for a given task name.
    List<org.springframework.cloud.task.repository.TaskExecution>
    Returns a List of the latest TaskExecution for 1 or more task names.
    long
    Retrieves current number of running task executions.
    org.springframework.cloud.task.repository.TaskExecution
    getTaskExecution(long executionId)
    find a task execution given an execution id and schema target.
    org.springframework.cloud.task.repository.TaskExecution
    getTaskExecutionByExternalExecutionId(String externalExecutionId, String platform)
    find a task execution given an external execution id and platform name.
    long
    Retrieves current number of task executions.
    long
    Get number of executions for a taskName.
    Returns the id of the TaskExecution that the requested Spring Batch job execution was executed within the context of.
    Retrieve a list of available task names.
    void
    Populate CTR status for all tasks
  • Method Details

    • getTaskExecution

      org.springframework.cloud.task.repository.TaskExecution getTaskExecution(long executionId)
      find a task execution given an execution id and schema target.
      Parameters:
      executionId - the task execution id
      Returns:
      the task execution
    • getTaskExecutionByExternalExecutionId

      org.springframework.cloud.task.repository.TaskExecution getTaskExecutionByExternalExecutionId(String externalExecutionId, String platform)
      find a task execution given an external execution id and platform name.
      Parameters:
      externalExecutionId - the external execution id
      platform - the platform name
      Returns:
      the task execution
    • findChildTaskExecutions

      List<org.springframework.cloud.task.repository.TaskExecution> findChildTaskExecutions(long executionId)
    • findChildTaskExecutions

      List<org.springframework.cloud.task.repository.TaskExecution> findChildTaskExecutions(Collection<Long> parentIds)
    • findRunningTaskExecutions

      org.springframework.data.domain.Page<org.springframework.cloud.task.repository.TaskExecution> findRunningTaskExecutions(String taskName, org.springframework.data.domain.Pageable pageable)
      Retrieve a collection of taskExecutions that have the task name provided.
      Parameters:
      taskName - the name of the task
      pageable - the constraints for the search
      Returns:
      the set of running executions for tasks with the specified name
    • getTaskNames

      List<String> getTaskNames()
      Retrieve a list of available task names.
      Returns:
      the task names that have been executed
    • getTaskExecutionCountByTaskName

      long getTaskExecutionCountByTaskName(String taskName)
      Get number of executions for a taskName.
      Parameters:
      taskName - the name of the task to be searched
      Returns:
      the number of running tasks that have the taskname specified
    • getTaskExecutionCount

      long getTaskExecutionCount()
      Retrieves current number of task executions.
      Returns:
      current number of task executions.
    • getRunningTaskExecutionCount

      long getRunningTaskExecutionCount()
      Retrieves current number of running task executions.
      Returns:
      current number of running task executions.
    • findTaskExecutions

      List<org.springframework.cloud.task.repository.TaskExecution> findTaskExecutions(String taskName, boolean onlyCompleted)
      Get a list of executions for a task by name and completion status.
      Parameters:
      taskName - the name of the task to be searched
      onlyCompleted - whether to include only completed tasks
      Returns:
      list of task executions
    • findTaskExecutionsBeforeEndTime

      List<org.springframework.cloud.task.repository.TaskExecution> findTaskExecutionsBeforeEndTime(String taskName, Date endTime)
      Get a list of executions for a task by name, completion status and end time.
      Parameters:
      taskName - the name of the task to be searched
      endTime - the tasks that ended before the endTime
      Returns:
      list of task executions
      Since:
      2.11.0
    • findTaskExecutionsByName

      org.springframework.data.domain.Page<org.springframework.cloud.task.repository.TaskExecution> findTaskExecutionsByName(String taskName, org.springframework.data.domain.Pageable pageable)
      Get a collection/page of executions.
      Parameters:
      taskName - the name of the task to be searched
      pageable - the constraints for the search
      Returns:
      list of task executions
    • findAll

      org.springframework.data.domain.Page<org.springframework.cloud.task.repository.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.
      Parameters:
      pageable - the constraints for the search
      Returns:
      page containing the results from the search
    • getTaskExecutionIdByJobExecutionId

      Long getTaskExecutionIdByJobExecutionId(long jobExecutionId)
      Returns the id of the TaskExecution that the requested Spring Batch job execution was executed within the context of. Returns null if none were found.
      Parameters:
      jobExecutionId - the id of the JobExecution
      Returns:
      the id of the TaskExecution
    • getJobExecutionIdsByTaskExecutionId

      Set<Long> getJobExecutionIdsByTaskExecutionId(long taskExecutionId)
      Returns a Set of JobExecution ids for the jobs that were executed within the scope of the requested task.
      Parameters:
      taskExecutionId - id of the TaskExecution
      Returns:
      a Set of the ids of the job executions executed within the task.
    • getLatestTaskExecutionsByTaskNames

      List<org.springframework.cloud.task.repository.TaskExecution> getLatestTaskExecutionsByTaskNames(String... taskNames)
      Returns a List 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.

      Parameters:
      taskNames - At least 1 task name must be provided
      Returns:
      List of TaskExecutions. May be empty but never null.
    • getLatestTaskExecutionForTaskName

      org.springframework.cloud.task.repository.TaskExecution getLatestTaskExecutionForTaskName(String taskName)
      Returns the latest task execution for a given task name. Will ultimately apply the same algorithm underneath as getLatestTaskExecutionsByTaskNames(String...) but will only return a single result.
      Parameters:
      taskName - Must not be null or empty
      Returns:
      The latest Task Execution or null
      See Also:
    • populateCtrStatus

      void populateCtrStatus(Collection<ThinTaskExecution> thinTaskExecutions)
      Populate CTR status for all tasks
      Parameters:
      thinTaskExecutions -