org.springframework.cloud.dataflow.server.controller.support

## Class TaskExecutionAwareTaskDefinition

- java.lang.Object
- - org.springframework.cloud.dataflow.server.controller.support.TaskExecutionAwareTaskDefinition

-     public class TaskExecutionAwareTaskDefinition
      extends Object

  `TaskDefinition` with the associated latest `TaskExecution`.
  Author:
    Gunnar Hillert

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskExecutionAwareTaskDefinition(TaskDefinition taskDefinition)` Initialized the `TaskExecutionAwareTaskDefinition` with the provided `TaskDefinition`.
    `TaskExecutionAwareTaskDefinition(TaskDefinition taskDefinition, org.springframework.cloud.task.repository.TaskExecution latestTaskExecution)` Initialized the `TaskExecutionAwareTaskDefinition` with the provided `TaskDefinition` and `TaskExecution`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.springframework.cloud.task.repository.TaskExecution` | `getLatestTaskExecution()` Returns the associated `TaskExecution` if available.
    `TaskDefinition` | `getTaskDefinition()` Returns the `TaskDefinition`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskExecutionAwareTaskDefinition

          public TaskExecutionAwareTaskDefinition(TaskDefinition taskDefinition,
                                                  org.springframework.cloud.task.repository.TaskExecution latestTaskExecution)

      Initialized the `TaskExecutionAwareTaskDefinition` with the provided `TaskDefinition` and `TaskExecution`.
      Parameters:
        `taskDefinition` - Must not be null
        `latestTaskExecution` - Must not be null

    - #### TaskExecutionAwareTaskDefinition

          public TaskExecutionAwareTaskDefinition(TaskDefinition taskDefinition)

      Initialized the `TaskExecutionAwareTaskDefinition` with the provided `TaskDefinition`. The underlying `TaskExecution` will be set to null.
      Parameters:
        `taskDefinition` - Must not be null

  - ### Method Detail

    - #### getTaskDefinition

          public TaskDefinition getTaskDefinition()

      Returns the `TaskDefinition`.
      Returns:
        Never null.

    - #### getLatestTaskExecution

          public org.springframework.cloud.task.repository.TaskExecution getLatestTaskExecution()

      Returns the associated `TaskExecution` if available. May return null.
      Returns:
        May return null

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.