public class ExecutorUtil extends Object
构造器和说明 |
---|
ExecutorUtil() |
限定符和类型 | 方法和说明 |
---|---|
static void |
gracefulShutdown(Executor executor,
int timeout)
Use the shutdown pattern from:
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ExecutorService.html
|
static boolean |
isTerminated(Executor executor) |
static URL |
setThreadName(URL url,
String defaultName)
append thread name with url address
|
static void |
shutdownNow(Executor executor,
int timeout) |
public static boolean isTerminated(Executor executor)
public static void gracefulShutdown(Executor executor, int timeout)
executor
- the Executor to shutdowntimeout
- the timeout in milliseconds before terminationpublic static void shutdownNow(Executor executor, int timeout)
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.