com.google.common.util.concurrent.testing
Class TestingExecutors
java.lang.Object
com.google.common.util.concurrent.testing.TestingExecutors
@Beta
public final class TestingExecutors
- extends Object
Factory methods for ExecutorService for testing.
- Since:
- 14.0
- Author:
- Chris Nokleberg
|
Method Summary |
static com.google.common.util.concurrent.ListeningScheduledExecutorService |
noOpScheduledExecutor()
Returns a ScheduledExecutorService that never executes anything. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
noOpScheduledExecutor
public static com.google.common.util.concurrent.ListeningScheduledExecutorService noOpScheduledExecutor()
- Returns a
ScheduledExecutorService that never executes anything.
The shutdownNow method of the returned executor always returns an empty list despite
the fact that everything is still technically awaiting execution.
The getDelay method of any ScheduledFuture returned by the executor will always
return the max long value instead of the time until the user-specified delay.
Copyright © 2010-2013. All Rights Reserved.