public class ExecutorUtil extends Object
| Constructor and Description |
|---|
ExecutorUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
cancelScheduledFuture(ScheduledFuture<?> scheduledFuture) |
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)
public static URL setThreadName(URL url, String defaultName)
public static void cancelScheduledFuture(ScheduledFuture<?> scheduledFuture)
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.