Package io.microsphere.concurrent
Class ExecutorUtils
- java.lang.Object
-
- io.microsphere.concurrent.ExecutorUtils
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
shutdown(java.util.concurrent.Executor executor)
ShutdownExecutor
if it's not shutdownstatic boolean
shutdown(java.util.concurrent.ExecutorService executorService)
ShutdownExecutorService
if it's not shutdownstatic void
shutdownOnExit(java.util.concurrent.Executor one, java.util.concurrent.Executor... others)
Shutdown one or moreexecutors
on JVM exit
-
-
-
Method Detail
-
shutdownOnExit
public static void shutdownOnExit(java.util.concurrent.Executor one, java.util.concurrent.Executor... others)
Shutdown one or moreexecutors
on JVM exit- Parameters:
one
- OneExecutor
others
- the otherexecutors
-
shutdown
public static boolean shutdown(java.util.concurrent.Executor executor)
ShutdownExecutor
if it's not shutdown- Parameters:
executor
-ExecutorService
- Returns:
true
if shutdown successfully, otherwisefalse
-
shutdown
public static boolean shutdown(java.util.concurrent.ExecutorService executorService)
ShutdownExecutorService
if it's not shutdown- Parameters:
executorService
-ExecutorService
- Returns:
true
if shutdown successfully, otherwisefalse
-
-