public class TaskInfoFetcher extends Object implements SimpleHttpResponseCallback<TaskInfo>
| Constructor and Description |
|---|
TaskInfoFetcher(Consumer<Throwable> onFail,
TaskInfo initialTask,
io.airlift.http.client.HttpClient httpClient,
io.airlift.units.Duration updateInterval,
io.airlift.json.JsonCodec<TaskInfo> taskInfoCodec,
io.airlift.units.Duration maxErrorDuration,
boolean summarizeTaskInfo,
Executor executor,
ScheduledExecutorService updateScheduledExecutor,
ScheduledExecutorService errorScheduledExecutor,
RemoteTaskStats stats) |
| Modifier and Type | Method and Description |
|---|---|
void |
addFinalTaskInfoListener(StateMachine.StateChangeListener<TaskInfo> stateChangeListener)
Add a listener for the final task info.
|
void |
failed(Throwable cause) |
void |
fatal(Throwable cause) |
TaskInfo |
getTaskInfo() |
void |
start() |
void |
success(TaskInfo newValue) |
public TaskInfoFetcher(Consumer<Throwable> onFail, TaskInfo initialTask, io.airlift.http.client.HttpClient httpClient, io.airlift.units.Duration updateInterval, io.airlift.json.JsonCodec<TaskInfo> taskInfoCodec, io.airlift.units.Duration maxErrorDuration, boolean summarizeTaskInfo, Executor executor, ScheduledExecutorService updateScheduledExecutor, ScheduledExecutorService errorScheduledExecutor, RemoteTaskStats stats)
public TaskInfo getTaskInfo()
public void start()
public void addFinalTaskInfoListener(StateMachine.StateChangeListener<TaskInfo> stateChangeListener)
this when adding a listener in a constructor. Additionally, it is
possible notifications are observed out of order due to the asynchronous execution.public void success(TaskInfo newValue)
success in interface SimpleHttpResponseCallback<TaskInfo>public void failed(Throwable cause)
failed in interface SimpleHttpResponseCallback<TaskInfo>public void fatal(Throwable cause)
fatal in interface SimpleHttpResponseCallback<TaskInfo>Copyright © 2012–2019. All rights reserved.