public class MapTaskExecutionDao extends Object implements TaskExecutionDao
Constructor and Description |
---|
MapTaskExecutionDao() |
Modifier and Type | Method and Description |
---|---|
void |
completeTaskExecution(long executionId,
Integer exitCode,
Date endTime,
String exitMessage)
Update and existing
TaskExecution . |
TaskExecution |
createTaskExecution(String taskName,
Date startTime,
List<String> arguments)
Save a new
TaskExecution . |
org.springframework.data.domain.Page<TaskExecution> |
findAll(org.springframework.data.domain.Pageable pageable)
Retrieves all the task executions within the pageable constraints.
|
org.springframework.data.domain.Page<TaskExecution> |
findRunningTaskExecutions(String taskName,
org.springframework.data.domain.Pageable pageable)
Retrieves a set of task executions that are running for a taskName.
|
org.springframework.data.domain.Page<TaskExecution> |
findTaskExecutionsByName(String taskName,
org.springframework.data.domain.Pageable pageable)
Retrieves a subset of task executions by task name, start location and size.
|
ConcurrentMap<Long,Set<Long>> |
getBatchJobAssociations() |
Set<Long> |
getJobExecutionIdsByTaskExecutionId(long taskExecutionId)
Returns the job execution ids associated with a task execution id.
|
long |
getNextExecutionId()
Retrieves the next available execution id for a task execution.
|
long |
getRunningTaskExecutionCountByTaskName(String taskName)
Retrieves current number of task executions for a taskName and with an endTime of null.
|
TaskExecution |
getTaskExecution(long executionId)
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.
|
Long |
getTaskExecutionIdByJobExecutionId(long jobExecutionId)
Returns the id of the TaskExecution that the requested Spring Batch job execution
was executed within the context of.
|
Map<Long,TaskExecution> |
getTaskExecutions() |
List<String> |
getTaskNames()
Retrieves a sorted list of distinct task names for the task executions.
|
public TaskExecution createTaskExecution(String taskName, Date startTime, List<String> arguments)
TaskExecutionDao
TaskExecution
.createTaskExecution
in interface TaskExecutionDao
taskName
- the name that associated with the task execution.startTime
- the time task began.arguments
- list of key/value pairs that configure the task.TaskExecution
instance.public void completeTaskExecution(long executionId, Integer exitCode, Date endTime, String exitMessage)
TaskExecutionDao
TaskExecution
.completeTaskExecution
in interface TaskExecutionDao
executionId
- the id of the taskExecution to be updated.exitCode
- the status of the task upon completion.endTime
- the time the task completed.exitMessage
- the message assigned to the task upon completion.public TaskExecution getTaskExecution(long executionId)
TaskExecutionDao
getTaskExecution
in interface TaskExecutionDao
executionId
- the id associated with the task execution.public long getTaskExecutionCountByTaskName(String taskName)
TaskExecutionDao
getTaskExecutionCountByTaskName
in interface TaskExecutionDao
taskName
- the name of the task to search for in the repository.public long getRunningTaskExecutionCountByTaskName(String taskName)
TaskExecutionDao
getRunningTaskExecutionCountByTaskName
in interface TaskExecutionDao
taskName
- the name of the task to search for in the repository.public long getTaskExecutionCount()
TaskExecutionDao
getTaskExecutionCount
in interface TaskExecutionDao
public org.springframework.data.domain.Page<TaskExecution> findRunningTaskExecutions(String taskName, org.springframework.data.domain.Pageable pageable)
TaskExecutionDao
findRunningTaskExecutions
in interface TaskExecutionDao
taskName
- the name of the task to search for in the repository.pageable
- the constraints for the search.public org.springframework.data.domain.Page<TaskExecution> findTaskExecutionsByName(String taskName, org.springframework.data.domain.Pageable pageable)
TaskExecutionDao
findTaskExecutionsByName
in interface TaskExecutionDao
taskName
- the name of the task to search for in the repository.pageable
- the constraints for the search.public List<String> getTaskNames()
TaskExecutionDao
getTaskNames
in interface TaskExecutionDao
public org.springframework.data.domain.Page<TaskExecution> findAll(org.springframework.data.domain.Pageable pageable)
TaskExecutionDao
findAll
in interface TaskExecutionDao
pageable
- the constraints for the searchpublic Map<Long,TaskExecution> getTaskExecutions()
public long getNextExecutionId()
TaskExecutionDao
getNextExecutionId
in interface TaskExecutionDao
public Long getTaskExecutionIdByJobExecutionId(long jobExecutionId)
TaskExecutionDao
getTaskExecutionIdByJobExecutionId
in interface TaskExecutionDao
jobExecutionId
- the id of the JobExecutionTaskExecution
public Set<Long> getJobExecutionIdsByTaskExecutionId(long taskExecutionId)
TaskExecutionDao
getJobExecutionIdsByTaskExecutionId
in interface TaskExecutionDao
taskExecutionId
- id of the TaskExecution
Set
of the ids of the job executions executed within the task.public ConcurrentMap<Long,Set<Long>> getBatchJobAssociations()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.