public final class HadoopExecutors
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.concurrent.ExecutorService |
newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory) |
|
static java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads) |
|
static java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads,
java.util.concurrent.ThreadFactory threadFactory) |
|
static java.util.concurrent.ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize) |
|
static java.util.concurrent.ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory) |
|
static java.util.concurrent.ExecutorService |
newSingleThreadExecutor() |
|
static java.util.concurrent.ExecutorService |
newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory) |
|
static java.util.concurrent.ScheduledExecutorService |
newSingleThreadScheduledExecutor() |
|
static java.util.concurrent.ScheduledExecutorService |
newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory) |
|
static void |
shutdown(java.util.concurrent.ExecutorService executorService,
org.slf4j.Logger logger,
long timeout,
java.util.concurrent.TimeUnit unit) |
Helper routine to shutdown a
ExecutorService. |
public static java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory)
public static java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads,
java.util.concurrent.ThreadFactory threadFactory)
public static java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads)
public static java.util.concurrent.ExecutorService newSingleThreadExecutor()
public static java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory)
public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize)
public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory)
public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor()
public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor(java.util.concurrent.ThreadFactory threadFactory)
public static void shutdown(java.util.concurrent.ExecutorService executorService,
org.slf4j.Logger logger,
long timeout,
java.util.concurrent.TimeUnit unit)
ExecutorService. Will wait up to a
certain timeout for the ExecutorService to gracefully shutdown. If the
ExecutorService did not shutdown and there are still tasks unfinished after
the timeout period, the ExecutorService will be notified to forcibly shut
down. Another timeout period will be waited before giving up. So, at most,
a shutdown will be allowed to wait up to twice the timeout value before
giving up.executorService - ExecutorService to shutdownlogger - Loggertimeout - the maximum time to waitunit - the time unit of the timeout argumentCopyright © 2008–2025 Apache Software Foundation. All rights reserved.