org.apache.ignite.internal.processors.task.monitor

## Class ComputeTaskStatus

- java.lang.Object
- - org.apache.ignite.internal.processors.task.monitor.ComputeTaskStatus

All Implemented Interfaces:
  ComputeTaskStatusSnapshot

    public class ComputeTaskStatus
    extends Object
    implements ComputeTaskStatusSnapshot

Task status container.

See Also:
  `ComputeTaskStatusSnapshot`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`Map<?,?>` `attributes()`
`@Nullable Object` `createBy()`
`long` `endTime()`
`@Nullable Throwable` `failReason()`
`boolean` `fullSupport()`
`boolean` `internal()`
`List<UUID>` `jobNodes()`
`static ComputeTaskStatus` `onFinishTask(GridTaskSessionImpl sessionImp, @Nullable Throwable err)` Creates a task status on finishing task.
`UUID` `originatingNodeId()`
`IgniteUuid` `sessionId()`
`static ComputeTaskStatus` `snapshot(GridTaskSessionImpl sessionImp)` Creates the status of a task that is in progress.
`long` `startTime()`
`ComputeTaskStatusEnum` `status()`
`String` `taskName()`

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

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

### Method Detail

#### sessionId

    public IgniteUuid sessionId()

Specified by:
  `sessionId` in interface `ComputeTaskStatusSnapshot`
Returns:
  Session ID of the task being executed.

#### taskName

    public String taskName()

Specified by:
  `taskName` in interface `ComputeTaskStatusSnapshot`
Returns:
  Task name of the task this session belongs to.

#### originatingNodeId

    public UUID originatingNodeId()

Specified by:
  `originatingNodeId` in interface `ComputeTaskStatusSnapshot`
Returns:
  ID of the node on which task execution originated.

#### startTime

    public long startTime()

Specified by:
  `startTime` in interface `ComputeTaskStatusSnapshot`
Returns:
  Start of computation time for the task.

#### endTime

    public long endTime()

Specified by:
  `endTime` in interface `ComputeTaskStatusSnapshot`
Returns:
  End of computation time for the task.

#### jobNodes

    public List<UUID> jobNodes()

Specified by:
  `jobNodes` in interface `ComputeTaskStatusSnapshot`
Returns:
  Nodes IDs on which the task jobs will execute.

#### attributes

    public Map<?,?> attributes()

Specified by:
  `attributes` in interface `ComputeTaskStatusSnapshot`
Returns:
  All session attributes.

#### status

    public ComputeTaskStatusEnum status()

Specified by:
  `status` in interface `ComputeTaskStatusSnapshot`
Returns:
  Status of the task.

#### failReason

    @Nullable
    public @Nullable Throwable failReason()

Specified by:
  `failReason` in interface `ComputeTaskStatusSnapshot`
Returns:
  Reason for the failure of the task.

#### fullSupport

    public boolean fullSupport()

Specified by:
  `fullSupport` in interface `ComputeTaskStatusSnapshot`
Returns:
  `true` if change of task attributes is available.

#### createBy

    @Nullable
    public @Nullable Object createBy()

Specified by:
  `createBy` in interface `ComputeTaskStatusSnapshot`
Returns:
  User who created the task, `null` if security is not available.

#### internal

    public boolean internal()

Specified by:
  `internal` in interface `ComputeTaskStatusSnapshot`
Returns:
  `True` if task is internal.

#### snapshot

    public static ComputeTaskStatus snapshot(GridTaskSessionImpl sessionImp)

Creates the status of a task that is in progress.

Parameters:
  `sessionImp` - Task session.
Returns:
  New instance.

#### onFinishTask

    public static ComputeTaskStatus onFinishTask(GridTaskSessionImpl sessionImp,
                                                 @Nullable
                                                 @Nullable Throwable err)

Creates a task status on finishing task.

Parameters:
  `sessionImp` - Task session.
  `err` - – Reason for the failure of the task, null if the task completed successfully.
Returns:
  New instance.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023