Interface ExecutorServicesController
-
- All Known Implementing Classes:
SimpleExecutorServices,TeamCityExecutorServicesImpl
public interface ExecutorServicesController
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanawaitTermination(long timeout, TimeUnit unit)Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.booleanisShutdown()booleanisTerminated()Returns true if all tasks have completed following shut down.voidshutdownGracefully()voidshutdownNow()voidstart()
-
-
-
Method Detail
-
start
void start()
-
shutdownGracefully
void shutdownGracefully()
-
shutdownNow
void shutdownNow()
-
isShutdown
boolean isShutdown()
-
isTerminated
boolean isTerminated()
Returns true if all tasks have completed following shut down. Note that isTerminated is never true unless either shutdown or shutdownNow was called first.- Returns:
- true if all tasks have completed following shut down
-
awaitTermination
boolean awaitTermination(long timeout, @NotNull TimeUnit unit) throws InterruptedExceptionBlocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.- Parameters:
timeout- the maximum time to waitunit- the time unit of the timeout argument- Returns:
- true if this executor terminated and false if the timeout elapsed before termination
- Throws:
InterruptedException- if interrupted while waiting
-
-