private static final class PromiseFactory.DefaultExecutors
extends java.lang.Object
implements java.util.concurrent.ThreadFactory, java.util.concurrent.RejectedExecutionHandler, java.lang.Runnable
| Modifier and Type | Class and Description |
|---|---|
private static class |
PromiseFactory.DefaultExecutors.ScheduledExecutor
ScheduledThreadPoolExecutor for scheduled execution.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.util.concurrent.ThreadPoolExecutor |
callbackExecutor |
private static PromiseFactory.DefaultExecutors |
callbacks |
private java.util.concurrent.ThreadFactory |
delegateThreadFactory |
private static PromiseFactory.DefaultExecutors.ScheduledExecutor |
scheduledExecutor |
private java.util.concurrent.atomic.AtomicBoolean |
shutdownHookInstalled |
| Modifier | Constructor and Description |
|---|---|
private |
DefaultExecutors() |
| Modifier and Type | Method and Description |
|---|---|
(package private) static java.util.concurrent.Executor |
callbackExecutor() |
java.lang.Thread |
newThread(java.lang.Runnable r)
Executor threads should not prevent VM from exiting
|
void |
rejectedExecution(java.lang.Runnable callback,
java.util.concurrent.ThreadPoolExecutor executor)
Call the callback using the caller's thread because the thread pool
rejected the execution.
|
void |
run()
Shutdown hook
|
(package private) static java.util.concurrent.ScheduledExecutorService |
scheduledExecutor() |
private static final PromiseFactory.DefaultExecutors callbacks
private static final PromiseFactory.DefaultExecutors.ScheduledExecutor scheduledExecutor
private static final java.util.concurrent.ThreadPoolExecutor callbackExecutor
private final java.util.concurrent.atomic.AtomicBoolean shutdownHookInstalled
private final java.util.concurrent.ThreadFactory delegateThreadFactory
static java.util.concurrent.Executor callbackExecutor()
static java.util.concurrent.ScheduledExecutorService scheduledExecutor()
public java.lang.Thread newThread(java.lang.Runnable r)
newThread in interface java.util.concurrent.ThreadFactorypublic void rejectedExecution(java.lang.Runnable callback,
java.util.concurrent.ThreadPoolExecutor executor)
rejectedExecution in interface java.util.concurrent.RejectedExecutionHandlerpublic void run()
run in interface java.lang.Runnable