public class TaskStatus extends Object
isComplete()
false) or it may be complete (isComplete()
true).
TaskStatus objects are immutable.Modifier and Type | Class and Description |
---|---|
static class |
TaskStatus.Status |
Modifier and Type | Method and Description |
---|---|
static TaskStatus |
failure(String taskId) |
static TaskStatus |
fromCode(String taskId,
TaskStatus.Status code) |
long |
getDuration() |
String |
getId() |
TaskStatus.Status |
getStatusCode() |
boolean |
isComplete()
Inverse of
isRunnable() . |
boolean |
isFailure()
Returned by tasks when they complete unsuccessfully.
|
boolean |
isRunnable()
Signals that a task is not yet complete, and is still runnable on a worker.
|
boolean |
isSuccess()
Returned by tasks when they spawn subtasks.
|
static TaskStatus |
running(String taskId) |
static TaskStatus |
success(String taskId) |
String |
toString() |
TaskStatus |
withDuration(long _duration) |
public static TaskStatus running(String taskId)
public static TaskStatus success(String taskId)
public static TaskStatus failure(String taskId)
public static TaskStatus fromCode(String taskId, TaskStatus.Status code)
public String getId()
public TaskStatus.Status getStatusCode()
public long getDuration()
public boolean isRunnable()
public boolean isComplete()
isRunnable()
.public boolean isSuccess()
public boolean isFailure()
public TaskStatus withDuration(long _duration)
Copyright © 2011–2015. All rights reserved.