org.apache.ignite.internal.processors.job

## Class JobWorkerInterruptionTimeoutObject

- java.lang.Object
- - org.apache.ignite.internal.processors.job.JobWorkerInterruptionTimeoutObject

All Implemented Interfaces:
  GridTimeoutObject

    public class JobWorkerInterruptionTimeoutObject
    extends Object
    implements GridTimeoutObject

Timeout object for delayed `worker` interruption.

After calling `GridJobWorker.cancel()` the worker should try to complete gracefully, if it doesn't then it will `interrupt` after some time.

### Constructor Summary

Constructors
Constructor and Description
`JobWorkerInterruptionTimeoutObject(GridJobWorker jobWorker, long endTime)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `endTime()`
`GridJobWorker` `jobWorker()`
`void` `onTimeout()` Timeout callback.
`IgniteUuid` `timeoutId()`
`String` `toString()`

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

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

### Constructor Detail

#### JobWorkerInterruptionTimeoutObject

    public JobWorkerInterruptionTimeoutObject(GridJobWorker jobWorker,
                                              long endTime)

Constructor.

Parameters:
  `jobWorker` - Compute job worker.
  `endTime` - Time when the timeout object should be executed in mills.

### Method Detail

#### timeoutId

    public IgniteUuid timeoutId()

Specified by:
  `timeoutId` in interface `GridTimeoutObject`
Returns:
  ID of the object.

#### endTime

    public long endTime()

Specified by:
  `endTime` in interface `GridTimeoutObject`
Returns:
  End time.

#### onTimeout

    public void onTimeout()

Timeout callback.

Specified by:
  `onTimeout` in interface `GridTimeoutObject`

#### jobWorker

    public GridJobWorker jobWorker()

Returns:
  Compute job worker.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

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