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 booleanshutdown(java.util.concurrent.Executor executor)ShutdownExecutorif it's not shutdownstatic booleanshutdown(java.util.concurrent.ExecutorService executorService)ShutdownExecutorServiceif it's not shutdownstatic voidshutdownOnExit(java.util.concurrent.Executor one, java.util.concurrent.Executor... others)Shutdown one or moreexecutorson JVM exit
-
-
-
Method Detail
-
shutdownOnExit
public static void shutdownOnExit(java.util.concurrent.Executor one, java.util.concurrent.Executor... others)Shutdown one or moreexecutorson JVM exit- Parameters:
one- OneExecutorothers- the otherexecutors
-
shutdown
public static boolean shutdown(java.util.concurrent.Executor executor)
ShutdownExecutorif it's not shutdown- Parameters:
executor-ExecutorService- Returns:
trueif shutdown successfully, otherwisefalse
-
shutdown
public static boolean shutdown(java.util.concurrent.ExecutorService executorService)
ShutdownExecutorServiceif it's not shutdown- Parameters:
executorService-ExecutorService- Returns:
trueif shutdown successfully, otherwisefalse
-
-