public final class TaskRuntime extends Object implements Runnable
Modifier and Type | Method and Description |
---|---|
void |
close(byte[] message)
Close the Task.
|
void |
deliver(byte[] message)
Deliver a message to the Task.
|
String |
getId() |
ReefServiceProtos.TaskStatusProto |
getStatusProto()
Called by heartbeat manager.
|
String |
getTaskId() |
boolean |
hasEnded() |
void |
initialize()
This method needs to be called before a Task can be run().
|
void |
run()
Run the task: Fire TaskStart, call Task.call(), fire TaskStop.
|
void |
suspend(byte[] message)
Suspend the Task.
|
public void initialize()
public void run()
public ReefServiceProtos.TaskStatusProto getStatusProto()
public boolean hasEnded()
public void close(byte[] message)
message
- the optional message for the close handler or null if there none.public void suspend(byte[] message)
message
- the optional message for the suspend handler or null if there none.public void deliver(byte[] message)
message
- the message to be delivered.Copyright © 2017 The Apache Software Foundation. All rights reserved.