public class PromisingExecutorService extends Object implements ExecutorService
Constructor and Description |
---|
PromisingExecutorService(com.google.common.util.concurrent.ListeningExecutorService service) |
Modifier and Type | Method and Description |
---|---|
boolean |
awaitTermination(long timeout,
TimeUnit unit) |
void |
execute(Runnable command) |
<T> List |
invokeAll(Collection<? extends Callable<T>> tasks) |
<T> List |
invokeAll(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks) |
<T> T |
invokeAny(Collection<? extends Callable<T>> tasks,
long timeout,
TimeUnit unit) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> com.atlassian.util.concurrent.Promise<T> |
submit(Callable<T> task) |
com.atlassian.util.concurrent.Promise<?> |
submit(Runnable task) |
<T> com.atlassian.util.concurrent.Promise<T> |
submit(Runnable task,
T result) |
public PromisingExecutorService(com.google.common.util.concurrent.ListeningExecutorService service)
public void shutdown()
shutdown
in interface ExecutorService
public List<Runnable> shutdownNow()
shutdownNow
in interface ExecutorService
public boolean isShutdown()
isShutdown
in interface ExecutorService
public boolean isTerminated()
isTerminated
in interface ExecutorService
public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException
awaitTermination
in interface ExecutorService
InterruptedException
public <T> com.atlassian.util.concurrent.Promise<T> submit(Callable<T> task)
submit
in interface ExecutorService
public <T> com.atlassian.util.concurrent.Promise<T> submit(Runnable task, T result)
submit
in interface ExecutorService
public com.atlassian.util.concurrent.Promise<?> submit(Runnable task)
submit
in interface ExecutorService
public <T> List invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
public <T> List invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException
invokeAll
in interface ExecutorService
InterruptedException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks) throws InterruptedException, ExecutionException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny
in interface ExecutorService
InterruptedException
ExecutionException
TimeoutException
Copyright © 2003–2017 Atlassian. All rights reserved.