public class ImmediateExecutor extends Object implements ExecutorService
FakeScheduledExecutor, and
trigger executions by ticking the clock.| Constructor and Description |
|---|
ImmediateExecutor() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long l,
TimeUnit timeUnit) |
void |
execute(Runnable runnable) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> collection) |
<T> List<Future<T>> |
invokeAll(Collection<? extends Callable<T>> collection,
long l,
TimeUnit timeUnit) |
<T> T |
invokeAny(Collection<? extends Callable<T>> collection) |
<T> T |
invokeAny(Collection<? extends Callable<T>> collection,
long l,
TimeUnit timeUnit) |
boolean |
isShutdown() |
boolean |
isTerminated() |
void |
shutdown() |
List<Runnable> |
shutdownNow() |
<T> net.morimekta.testing.concurrent.ImmediateExecutor.DoneTask<T> |
submit(Callable<T> callable) |
net.morimekta.testing.concurrent.ImmediateExecutor.DoneTask<?> |
submit(Runnable runnable) |
<T> net.morimekta.testing.concurrent.ImmediateExecutor.DoneTask<T> |
submit(Runnable runnable,
T t) |
public void shutdown()
shutdown in interface ExecutorService@Nonnull public List<Runnable> shutdownNow()
shutdownNow in interface ExecutorServicepublic boolean isShutdown()
isShutdown in interface ExecutorServicepublic boolean isTerminated()
isTerminated in interface ExecutorServicepublic boolean awaitTermination(long l,
@Nonnull
TimeUnit timeUnit)
throws InterruptedException
awaitTermination in interface ExecutorServiceInterruptedException@Nonnull public <T> net.morimekta.testing.concurrent.ImmediateExecutor.DoneTask<T> submit(@Nonnull Callable<T> callable)
submit in interface ExecutorService@Nonnull public <T> net.morimekta.testing.concurrent.ImmediateExecutor.DoneTask<T> submit(@Nonnull Runnable runnable, T t)
submit in interface ExecutorService@Nonnull public net.morimekta.testing.concurrent.ImmediateExecutor.DoneTask<?> submit(@Nonnull Runnable runnable)
submit in interface ExecutorService@Nonnull public <T> List<Future<T>> invokeAll(@Nonnull Collection<? extends Callable<T>> collection) throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedException@Nonnull public <T> List<Future<T>> invokeAll(@Nonnull Collection<? extends Callable<T>> collection, long l, @Nonnull TimeUnit timeUnit) throws InterruptedException
invokeAll in interface ExecutorServiceInterruptedException@Nonnull public <T> T invokeAny(@Nonnull Collection<? extends Callable<T>> collection) throws InterruptedException, ExecutionException
invokeAny in interface ExecutorServiceInterruptedExceptionExecutionExceptionpublic <T> T invokeAny(@Nonnull Collection<? extends Callable<T>> collection, long l, @Nonnull TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException
invokeAny in interface ExecutorServiceInterruptedExceptionExecutionExceptionTimeoutExceptionCopyright © 2017. All rights reserved.