public class Task extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Task.Status |
Constructor and Description |
---|
Task(long id,
String type,
String action,
String description) |
Task(long id,
String type,
String action,
String description,
TaskId parentTask) |
Task(long id,
String type,
String action,
String description,
TaskId parentTask,
long startTime,
long startTimeNanos) |
Modifier and Type | Method and Description |
---|---|
String |
getAction()
Returns task action
|
String |
getDescription()
Generates task description
|
long |
getId()
Returns task id
|
TaskId |
getParentTaskId()
Returns id of the parent task or NO_PARENT_ID if the task doesn't have any parent tasks
|
long |
getStartTime()
Returns the task start time
|
Task.Status |
getStatus()
Build a status for this task or null if this task doesn't have status.
|
String |
getType()
Returns task channel type (netty, transport, direct)
|
TaskInfo |
taskInfo(DiscoveryNode node,
boolean detailed)
Build a version of the task status you can throw over the wire and back
to the user.
|
public TaskInfo taskInfo(DiscoveryNode node, boolean detailed)
node
- the node this task is running ondetailed
- should the information include detailed, potentially slow to
generate data?public long getId()
public String getType()
public String getAction()
public String getDescription()
public long getStartTime()
public TaskId getParentTaskId()
public Task.Status getStatus()
Copyright © 2009–2016. All rights reserved.