Package org.apache.qpid.proton.reactor.impl

# Class TaskImpl

java.lang.Object
org.apache.qpid.proton.reactor.impl.TaskImpl

All Implemented Interfaces:
  `Comparable<TaskImpl>`, `Extendable`, `Task`

public class TaskImpl extends Object implements Task, Comparable<TaskImpl>

## Constructor Summary

Constructors
Constructor
Description
`TaskImpl(long deadline, int counter)`

## Method Summary

Modifier and Type
Method
Description
`Record`
`attachments()`
`void`
`cancel()`
Cancel the execution of this task.
`int`
`compareTo(TaskImpl other)`
`long`
`deadline()`
`Reactor`
`getReactor()`
`boolean`
`isCancelled()`
`void`
`setReactor(Reactor reactor)`

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

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

## Constructor Details

### TaskImpl

public TaskImpl(long deadline, int counter)

## Method Details

### compareTo

public int compareTo(TaskImpl other)

Specified by:
  `compareTo` in interface `Comparable<TaskImpl>`

### deadline

public long deadline()

Specified by:
  `deadline` in interface `Task`
Returns:
  the deadline at which the handler associated with the scheduled task should be delivered a `Event.Type.TIMER_TASK` event.

### isCancelled

public boolean isCancelled()

### cancel

public void cancel()
Description copied from interface: `Task`
Cancel the execution of this task. No-op if invoked after the task was already executed.

Specified by:
  `cancel` in interface `Task`

### setReactor

public void setReactor(Reactor reactor)

### getReactor

public Reactor getReactor()

Specified by:
  `getReactor` in interface `Task`
Returns:
  the reactor that created this task.

### attachments

public Record attachments()

Specified by:
  `attachments` in interface `Extendable`