Class RoboExecutorService
java.lang.Object
org.robolectric.android.util.concurrent.RoboExecutorService
- All Implemented Interfaces:
Executor
,ExecutorService
@Deprecated public class RoboExecutorService extends Object implements ExecutorService
Deprecated.
only works when used in conjunction with the deprecated
LooperMode.LEGACY
mode. Consider using guava's MoreExecutors#directExecutor()
or PausedExecutorService
or InlineExecutorService
.Executor service that runs all operations on the background scheduler.
-
Constructor Summary
Constructors Constructor Description RoboExecutorService()
Deprecated. -
Method Summary
Modifier and Type Method Description boolean
awaitTermination(long l, TimeUnit timeUnit)
Deprecated.void
execute(Runnable runnable)
Deprecated.<T> List<Future<T>>
invokeAll(Collection<? extends Callable<T>> callables)
Deprecated.<T> List<Future<T>>
invokeAll(Collection<? extends Callable<T>> callables, long l, TimeUnit timeUnit)
Deprecated.<T> T
invokeAny(Collection<? extends Callable<T>> callables)
Deprecated.<T> T
invokeAny(Collection<? extends Callable<T>> callables, long l, TimeUnit timeUnit)
Deprecated.boolean
isShutdown()
Deprecated.boolean
isTerminated()
Deprecated.void
shutdown()
Deprecated.List<Runnable>
shutdownNow()
Deprecated.Future<?>
submit(Runnable runnable)
Deprecated.<T> Future<T>
submit(Runnable runnable, T t)
Deprecated.<T> Future<T>
submit(Callable<T> tCallable)
Deprecated.
-
Constructor Details
-
RoboExecutorService
public RoboExecutorService()Deprecated.
-
-
Method Details
-
shutdown
public void shutdown()Deprecated.- Specified by:
shutdown
in interfaceExecutorService
-
shutdownNow
Deprecated.- Specified by:
shutdownNow
in interfaceExecutorService
-
isShutdown
public boolean isShutdown()Deprecated.- Specified by:
isShutdown
in interfaceExecutorService
-
isTerminated
public boolean isTerminated()Deprecated.- Specified by:
isTerminated
in interfaceExecutorService
-
awaitTermination
Deprecated.- Specified by:
awaitTermination
in interfaceExecutorService
- Throws:
InterruptedException
-
submit
Deprecated.- Specified by:
submit
in interfaceExecutorService
-
submit
Deprecated.- Specified by:
submit
in interfaceExecutorService
-
submit
Deprecated.- Specified by:
submit
in interfaceExecutorService
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> callables) throws InterruptedExceptionDeprecated.- Specified by:
invokeAll
in interfaceExecutorService
- Throws:
InterruptedException
-
invokeAll
public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> callables, long l, TimeUnit timeUnit) throws InterruptedExceptionDeprecated.- Specified by:
invokeAll
in interfaceExecutorService
- Throws:
InterruptedException
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> callables) throws InterruptedException, ExecutionExceptionDeprecated.- Specified by:
invokeAny
in interfaceExecutorService
- Throws:
InterruptedException
ExecutionException
-
invokeAny
public <T> T invokeAny(Collection<? extends Callable<T>> callables, long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutExceptionDeprecated.- Specified by:
invokeAny
in interfaceExecutorService
- Throws:
InterruptedException
ExecutionException
TimeoutException
-
execute
Deprecated.
-