public class TaskStatus extends Descriptor
A typical JSON representation might be:
{
"containerId" : "e890d827e802934a29c97d7e9e3c96a55ca049e519ab0c28be8020621a0a3750",
"env" : {
"SYSLOG_HOST_PORT" : "10.99.0.1:514"
},
"goal" : "START",
"job" : { #... see the definition of Job },
"ports" : {
"http" : {
"externalPort" : 8080,
"internalPort" : 8080,
"protocol" : "tcp"
},
"http-admin" : {
"externalPort" : 8081,
"internalPort" : 8081,
"protocol" : "tcp"
}
},
"state" : "RUNNING",
"throttled" : "NO",
"containerError": "Something broke starting the container!"
},
| Modifier and Type | Class and Description |
|---|---|
static class |
TaskStatus.Builder |
static class |
TaskStatus.State |
| Constructor and Description |
|---|
TaskStatus(Job job,
Goal goal,
TaskStatus.State state,
String containerId,
ThrottleState throttled,
Map<String,PortMapping> ports,
Map<String,String> env,
String containerError) |
| Modifier and Type | Method and Description |
|---|---|
TaskStatus.Builder |
asBuilder() |
boolean |
equals(Object obj) |
String |
getContainerError() |
String |
getContainerId() |
Map<String,String> |
getEnv() |
Goal |
getGoal() |
Job |
getJob() |
Map<String,PortMapping> |
getPorts() |
TaskStatus.State |
getState() |
ThrottleState |
getThrottled() |
int |
hashCode() |
static TaskStatus.Builder |
newBuilder() |
String |
toString() |
parse, parse, toJsonBytes, toJsonStringpublic TaskStatus(Job job, @Nullable Goal goal, TaskStatus.State state, @Nullable String containerId, ThrottleState throttled, Map<String,PortMapping> ports, @Nullable Map<String,String> env, @Nullable String containerError)
job - The job the task is running.goal - The desired state of the task.state - The state of the task.containerId - The containerId, if the task has one (yet).throttled - The throttle state of the task.ports - The ports actually assigned to the task.env - The environment passed to the container.containerError - The last Docker error encountered while starting the container.public TaskStatus.Builder asBuilder()
public ThrottleState getThrottled()
@Nullable public String getContainerId()
public Goal getGoal()
public TaskStatus.State getState()
public Job getJob()
public Map<String,PortMapping> getPorts()
public String getContainerError()
public static TaskStatus.Builder newBuilder()
Copyright © 2017. All rights reserved.