Package com.yahoo.concurrent
Class InThreadExecutorService
- java.lang.Object
-
- java.util.concurrent.AbstractExecutorService
-
- com.yahoo.concurrent.InThreadExecutorService
-
- All Implemented Interfaces:
java.util.concurrent.Executor
,java.util.concurrent.ExecutorService
public class InThreadExecutorService extends java.util.concurrent.AbstractExecutorService
ExecutorService
implementation that runs all tasks in the calling thread. Useful for tests.- Author:
- jonmv
-
-
Constructor Summary
Constructors Constructor Description InThreadExecutorService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
void
execute(java.lang.Runnable command)
boolean
isShutdown()
boolean
isTerminated()
void
shutdown()
java.util.List<java.lang.Runnable>
shutdownNow()
-
-
-
Method Detail
-
shutdown
public void shutdown()
-
shutdownNow
public java.util.List<java.lang.Runnable> shutdownNow()
-
isShutdown
public boolean isShutdown()
-
isTerminated
public boolean isTerminated()
-
awaitTermination
public boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit)
-
execute
public void execute(java.lang.Runnable command)
-
-