public class

MyTask

extends Object
implements Task
java.lang.Object
   ↳ org.apache.helix.provisioning.yarn.example.MyTask

Class Overview

Callbacks for task execution - THIS INTERFACE IS SUBJECT TO CHANGE

Summary

Public Constructors
MyTask(TaskCallbackContext context)
Public Methods
void cancel()
Signals the task to stop execution.
TaskResult run()
Execute the task.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.helix.task.Task

Public Constructors

public MyTask (TaskCallbackContext context)

Public Methods

public void cancel ()

Signals the task to stop execution. The task implementation should carry out any clean up actions that may be required and return from the run() method.

public TaskResult run ()

Execute the task.

Returns
  • A TaskResult object indicating the status of the task and any additional context information that can be interpreted by the specific Task implementation.