public class AggregateDataFlowTaskExecutionQueryDao extends Object implements DataflowTaskExecutionQueryDao
| Modifier and Type | Field and Description |
|---|---|
static String |
FROM_CLAUSE
FROM clause for task execution.
|
static String |
RUNNING_TASK_WHERE_CLAUSE
WHERE clause for running task.
|
static String |
SELECT_CLAUSE
SELECT clause for task execution.
|
static String |
TASK_NAME_WHERE_CLAUSE
WHERE clause for task name.
|
| Constructor and Description |
|---|
AggregateDataFlowTaskExecutionQueryDao(DataSource dataSource,
SchemaService schemaService)
Initializes the AggregateDataFlowJobExecutionDao.
|
| 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.
|
org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findAll(org.springframework.data.domain.Pageable pageable,
boolean thinResults)
Retrieves all the task executions within the pageable constraints.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findChildTaskExecutions(Collection<Long> parentIds,
String schemaTarget)
Retrieves a list of task executions where the provided execution ids and schemaTarget represents the parents of task executions.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findChildTaskExecutions(long executionId,
String schemaTarget)
Retrieves a list of task executions where the provided execution id and schemaTarget represents the parent of task execution.
|
org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findRunningTaskExecutions(String taskName,
org.springframework.data.domain.Pageable pageable)
Retrieves a set of task executions that are running for a taskName.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findTaskExecutions(String taskName,
boolean completed)
Find task executions by task name and completion status.
|
List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findTaskExecutionsBeforeEndTime(String taskName,
Date endTime)
Find task executions by task name whose end date is before the specified date.
|
org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> |
findTaskExecutionsByName(String taskName,
org.springframework.data.domain.Pageable pageable)
Retrieves a subset of task executions by task name, start location and size.
|
org.springframework.cloud.dataflow.schema.AggregateTaskExecution |
geTaskExecutionByExecutionId(String externalExecutionId,
String taskName) |
long |
getCompletedTaskExecutionCountByTaskName(String taskName)
Retrieves current number of task executions for a taskName and with a non-null endTime.
|
long |
getCompletedTaskExecutionCountByTaskNameAndBeforeDate(String taskName,
Date endTime)
Retrieves current number of task executions for a taskName and with a non-null endTime before the specified date.
|
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 task executions with an endTime of null.
|
long |
getRunningTaskExecutionCountByTaskName(String taskName)
Retrieves current number of task executions for a taskName and with an endTime of
null.
|
org.springframework.cloud.dataflow.schema.AggregateTaskExecution |
getTaskExecution(long executionId,
String schemaTarget)
Retrieves a task execution from the task repository.
|
long |
getTaskExecutionCount()
Retrieves current number of task executions.
|
long |
getTaskExecutionCountByTaskName(String taskName)
Retrieves current number of task executions for a taskName.
|
List<String> |
getTaskNames()
Retrieves a sorted list of distinct task names for the task executions.
|
public static final String SELECT_CLAUSE
public static final String FROM_CLAUSE
public static final String RUNNING_TASK_WHERE_CLAUSE
public static final String TASK_NAME_WHERE_CLAUSE
public AggregateDataFlowTaskExecutionQueryDao(DataSource dataSource, SchemaService schemaService)
dataSource - used by the dao to execute queries and update the tables.schemaService - used the find schema target informationpublic org.springframework.cloud.dataflow.schema.AggregateTaskExecution geTaskExecutionByExecutionId(String externalExecutionId, String taskName)
geTaskExecutionByExecutionId in interface DataflowTaskExecutionQueryDaopublic org.springframework.cloud.dataflow.schema.AggregateTaskExecution getTaskExecution(long executionId,
String schemaTarget)
DataflowTaskExecutionQueryDaogetTaskExecution in interface DataflowTaskExecutionQueryDaoexecutionId - the id associated with the task execution.schemaTarget - the schema target.public List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findChildTaskExecutions(long executionId, String schemaTarget)
DataflowTaskExecutionQueryDaofindChildTaskExecutions in interface DataflowTaskExecutionQueryDaoexecutionId - parent task execution idschemaTarget - parent task schema targetpublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findChildTaskExecutions(Collection<Long> parentIds, String schemaTarget)
DataflowTaskExecutionQueryDaofindChildTaskExecutions in interface DataflowTaskExecutionQueryDaoparentIds - parent task execution idsschemaTarget - parent task schema targetpublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findTaskExecutions(String taskName, boolean completed)
DataflowTaskExecutionQueryDaofindTaskExecutions in interface DataflowTaskExecutionQueryDaotaskName - the name of the task to search for in the repository.completed - whether to include only completed task executions.public List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findTaskExecutionsBeforeEndTime(String taskName, @NonNull Date endTime)
DataflowTaskExecutionQueryDaofindTaskExecutionsBeforeEndTime in interface DataflowTaskExecutionQueryDaotaskName - the name of the task to search for in the repository.endTime - the time before the task ended.public long getTaskExecutionCountByTaskName(String taskName)
DataflowTaskExecutionQueryDaogetTaskExecutionCountByTaskName in interface DataflowTaskExecutionQueryDaotaskName - the name of the taskpublic long getCompletedTaskExecutionCountByTaskName(String taskName)
DataflowTaskExecutionQueryDaogetCompletedTaskExecutionCountByTaskName in interface DataflowTaskExecutionQueryDaotaskName - the name of the taskpublic long getCompletedTaskExecutionCountByTaskNameAndBeforeDate(String taskName, @NonNull Date endTime)
DataflowTaskExecutionQueryDaogetCompletedTaskExecutionCountByTaskNameAndBeforeDate in interface DataflowTaskExecutionQueryDaotaskName - the name of the taskendTime - the time before task endedpublic long getRunningTaskExecutionCountByTaskName(String taskName)
DataflowTaskExecutionQueryDaogetRunningTaskExecutionCountByTaskName in interface DataflowTaskExecutionQueryDaotaskName - the name of the task to search for in the repository.public long getRunningTaskExecutionCount()
DataflowTaskExecutionQueryDaogetRunningTaskExecutionCount in interface DataflowTaskExecutionQueryDaopublic List<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> getLatestTaskExecutionsByTaskNames(String... taskNames)
DataflowTaskExecutionQueryDaoList 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 DataflowTaskExecutionQueryDaotaskNames - At least 1 task name must be providedpublic org.springframework.cloud.dataflow.schema.AggregateTaskExecution getLatestTaskExecutionForTaskName(String taskName)
DataflowTaskExecutionQueryDaoDataflowTaskExecutionQueryDao.getLatestTaskExecutionsByTaskNames(String...)
but will only return a single result.getLatestTaskExecutionForTaskName in interface DataflowTaskExecutionQueryDaotaskName - Must not be null or emptyDataflowTaskExecutionQueryDao.getLatestTaskExecutionsByTaskNames(String...)public long getTaskExecutionCount()
DataflowTaskExecutionQueryDaogetTaskExecutionCount in interface DataflowTaskExecutionQueryDaopublic org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findRunningTaskExecutions(String taskName, org.springframework.data.domain.Pageable pageable)
DataflowTaskExecutionQueryDaofindRunningTaskExecutions in interface DataflowTaskExecutionQueryDaotaskName - the name of the task to search for in the repository.pageable - the constraints for the search.public org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findTaskExecutionsByName(String taskName, org.springframework.data.domain.Pageable pageable)
DataflowTaskExecutionQueryDaofindTaskExecutionsByName in interface DataflowTaskExecutionQueryDaotaskName - the name of the task to search for in the repository.pageable - the constraints for the search.public List<String> getTaskNames()
DataflowTaskExecutionQueryDaogetTaskNames in interface DataflowTaskExecutionQueryDaopublic org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findAll(org.springframework.data.domain.Pageable pageable)
DataflowTaskExecutionQueryDaofindAll in interface DataflowTaskExecutionQueryDaopageable - the constraints for the searchpublic org.springframework.data.domain.Page<org.springframework.cloud.dataflow.schema.AggregateTaskExecution> findAll(org.springframework.data.domain.Pageable pageable,
boolean thinResults)
DataflowTaskExecutionQueryDaofindAll in interface DataflowTaskExecutionQueryDaopageable - the constraints for the searchthinResults - Indicated if arguments will be populatedCopyright © 2024 Pivotal Software, Inc.. All rights reserved.