Package org.osgi.util.promise
Class PromiseFactory.DefaultExecutors
java.lang.Object
org.osgi.util.promise.PromiseFactory.DefaultExecutors
- All Implemented Interfaces:
Runnable
,RejectedExecutionHandler
,ThreadFactory
- Enclosing class:
- PromiseFactory
private static final class PromiseFactory.DefaultExecutors
extends Object
implements ThreadFactory, RejectedExecutionHandler, Runnable
Default executors for Promises.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
ScheduledThreadPoolExecutor for scheduled execution. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ThreadPoolExecutor
private static final PromiseFactory.DefaultExecutors
private final ThreadFactory
private static final PromiseFactory.DefaultExecutors.ScheduledExecutor
private final AtomicBoolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static Executor
Executor threads should not prevent VM from exitingvoid
rejectedExecution
(Runnable callback, ThreadPoolExecutor executor) Call the callback using the caller's thread because the thread pool rejected the execution.void
run()
Shutdown hook(package private) static ScheduledExecutorService
-
Field Details
-
callbacks
-
scheduledExecutor
-
callbackExecutor
-
shutdownHookInstalled
-
delegateThreadFactory
-
-
Constructor Details
-
DefaultExecutors
private DefaultExecutors()
-
-
Method Details
-
callbackExecutor
-
scheduledExecutor
-
newThread
Executor threads should not prevent VM from exiting- Specified by:
newThread
in interfaceThreadFactory
-
rejectedExecution
Call the callback using the caller's thread because the thread pool rejected the execution.- Specified by:
rejectedExecution
in interfaceRejectedExecutionHandler
-
run
public void run()Shutdown hook
-