Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public abstract class AbstractExecutorService
- Object
- AbstractExecutorService
ImplementsExecutor, ExecutorService
The
ExecutorService methods that need nothing but execute: a
subclass provides execution and the life cycle, and gets submit,
invokeAll and invokeAny from here.Constructors
public AbstractExecutorService() |
Methods
Inherited methods
Constructor details
AbstractExecutorService
public AbstractExecutorService()Method details
newTaskFor
protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)newTaskFor
protected <T> RunnableFuture<T> newTaskFor(Callable<T> callable)submit
public Future<?> submit(Runnable task)submit
public <T> Future<T> submit(Runnable task, T result)submit
public <T> Future<T> submit(Callable<T> task)invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks)
throws InterruptedExceptionRuns every task and answers their futures, all of them done.
Throws
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
throws InterruptedExceptionRuns every task and answers their futures once all are done or the
time is up; the ones not done by then are cancelled.
Throws
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks)
throws InterruptedException, ExecutionExceptionThe result of one of the tasks that completed without failing; the
others are cancelled.
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutExceptionAs
invokeAny(Collection), giving up with a TimeoutException when
no task has succeeded in time.