Task.callable
.@Deprecated public class CallableTask<T> extends BaseTask<T>
Task
that will run a Callable
and will set the task's value
to the value returned from the callable.
Use Tasks.callable(String, java.util.concurrent.Callable)
to create
instances of this class.
Task.callable
BaseTask.State
_shallowTraceBuilder, _traceValueProvider
Constructor and Description |
---|
CallableTask(java.lang.String name,
java.util.concurrent.Callable<? extends T> callable)
Deprecated.
|
CallableTask(java.lang.String name,
ThrowableCallable<? extends T> callable)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected Promise<? extends T> |
run(Context context)
Deprecated.
This template method is invoked when the task is run.
|
cancel, contextRun, getId, getName, getPriority, getSettableDelegate, getShallowTrace, getShallowTraceBuilder, getTrace, getTraceBuilder, markTaskPending, markTaskStarted, setPriority, setTraceValueSerializer, toString, traceFailure, transitionCancel, transitionDone, transitionPending, transitionRun
addListener, await, await, get, getDelegate, getError, getOrDefault, isDone, isFailed
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
action, action, andThen, andThen, andThen, andThen, apply, async, async, async, async, blocking, blocking, callable, callable, failure, failure, flatMap, flatMap, flatten, flatten, map, map, onFailure, onFailure, par, par, par, par, par, par, par, par, recover, recover, recoverWith, recoverWith, shareable, toTry, toTry, transform, transform, value, value, withSideEffect, withSideEffect, withTimeout
addListener, await, await, get, getError, getOrDefault, isDone, isFailed
public CallableTask(java.lang.String name, java.util.concurrent.Callable<? extends T> callable)
public CallableTask(java.lang.String name, ThrowableCallable<? extends T> callable)