| Modifier and Type | Field and Description |
|---|---|
| private final ExecutorService | |
| private static final Logger | |
| protected final DefaultMonitoringConfig | monitoringConfig
ThreadPool probes |
| private final ThreadPoolConfig | |
| private final Semaphore | |
| private final Semaphore | |
| private final AtomicInteger | |
| private final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | awaitTermination(long timeout, TimeUnit unit)
Implements java. Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first. |
| private void | |
| public static VirtualThreadExecutorService | |
| public static VirtualThreadExecutorService | |
| pack-priv Object | |
| public void | execute(Runnable task)
Implements java. Executes the given command at some time in the future. |
| public ThreadPoolConfig | |
| public DefaultMonitoringConfig | |
| public int | |
| public int | |
| private ThreadFactory | |
| public boolean | isShutdown()
Implements org. Returns |
| public boolean | isTerminated()
Implements java. Returns |
| protected void | onMaxNumberOfThreadsReached()
Method is called by AbstractThreadPool, when maximum number of worker threads is reached and task will need to wait in task queue, until one of the threads will be able to process it. |
| protected void | onTaskCancelled(Runnable task)
Method is called by a thread pool each time a dequeued task has been canceled instead of being processed. |
| protected void | onTaskCompletedEvent(Runnable
the unit of work that has completed processing task)
This method will be invoked when a the specified |
| protected void | onTaskDequeued(Runnable task)
Method is called by a thread pool each time a task has been dequeued from a task queue. |
| protected void | onTaskQueued(Runnable task)
Method is called by a thread pool each time new task has been queued to a task queue. |
| protected void | onWorkerExit(Thread thread)
Method is called by |
| protected void | onWorkerStarted(Thread thread)
Method is called by |
| public void | shutdown()
Implements java. Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. |
| public List | shutdownNow()
Implements java. Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. |
| public void | uncaughtException(Thread thread, Throwable throwable)
Implements java. Method invoked when the given thread terminates due to the given uncaught exception. |
| internalExecutorService | back to summary |
|---|---|
| private final ExecutorService internalExecutorService | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| monitoringConfig | back to summary |
|---|---|
| protected final DefaultMonitoringConfig<ThreadPoolProbe> monitoringConfig ThreadPool probes | |
| originalConfig | back to summary |
|---|---|
| private final ThreadPoolConfig originalConfig | |
| poolSemaphore | back to summary |
|---|---|
| private final Semaphore poolSemaphore | |
| queueSemaphore | back to summary |
|---|---|
| private final Semaphore queueSemaphore | |
| queueSize | back to summary |
|---|---|
| private final AtomicInteger queueSize | |
| threadsCount | back to summary |
|---|---|
| private final AtomicInteger threadsCount | |
| VirtualThreadExecutorService | back to summary |
|---|---|
| protected VirtualThreadExecutorService(ThreadPoolConfig config) | |
| awaitTermination | back to summary |
|---|---|
| public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException Implements java. Doc from java. Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.
| |
| beforeExecute | back to summary |
|---|---|
| private void beforeExecute(final AbstractThreadPool. | |
| createInstance | back to summary |
|---|---|
| public static VirtualThreadExecutorService createInstance() | |
| createInstance | back to summary |
|---|---|
| public static VirtualThreadExecutorService createInstance(ThreadPoolConfig cfg) | |
| createJmxManagementObject | back to summary |
|---|---|
| pack-priv Object createJmxManagementObject() | |
| execute | back to summary |
|---|---|
| public void execute(Runnable task) Implements java. Doc from java. Executes the given command at some time in the future. The command
may execute in a new thread, in a pooled thread, or in the calling
thread, at the discretion of the
| |
| getConfig | back to summary |
|---|---|
| public ThreadPoolConfig getConfig() Implements org.
| |
| getMonitoringConfig | back to summary |
|---|---|
| public DefaultMonitoringConfig Implements org.
| |
| getQueueSize | back to summary |
|---|---|
| public int getQueueSize() Implements org.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Implements org.
| |
| getThreadFactory | back to summary |
|---|---|
| private ThreadFactory getThreadFactory(ThreadPoolConfig threadPoolConfig) | |
| isShutdown | back to summary |
|---|---|
| public boolean isShutdown() Implements org. Doc from java. Returns
| |
| isTerminated | back to summary |
|---|---|
| public boolean isTerminated() Implements java. Doc from java. Returns
| |
| onMaxNumberOfThreadsReached | back to summary |
|---|---|
| protected void onMaxNumberOfThreadsReached() Method is called by AbstractThreadPool, when maximum number of worker threads is reached and task will need to wait in task queue, until one of the threads will be able to process it. | |
| onTaskCancelled | back to summary |
|---|---|
| protected void onTaskCancelled(Runnable task) Method is called by a thread pool each time a dequeued task has been canceled instead of being processed. | |
| onTaskCompletedEvent | back to summary |
|---|---|
| protected void onTaskCompletedEvent(Runnable task)
This method will be invoked when a the specified
| |
| onTaskDequeued | back to summary |
|---|---|
| protected void onTaskDequeued(Runnable task) Method is called by a thread pool each time a task has been dequeued from a task queue. | |
| onTaskQueued | back to summary |
|---|---|
| protected void onTaskQueued(Runnable task) Method is called by a thread pool each time new task has been queued to a task queue. | |
| onWorkerExit | back to summary |
|---|---|
| protected void onWorkerExit(Thread thread) Method is called by | |
| onWorkerStarted | back to summary |
|---|---|
| protected void onWorkerStarted(Thread thread) Method is called by | |
| shutdown | back to summary |
|---|---|
| public void shutdown() Implements java. Doc from java. Initiates an orderly shutdown in which previously submitted tasks are executed, but no new tasks will be accepted. Invocation has no additional effect if already shut down. This method does not wait for previously submitted tasks to
complete execution. Use
| |
| shutdownNow | back to summary |
|---|---|
| public List Implements java. Doc from java. Attempts to stop all actively executing tasks, halts the processing of waiting tasks, and returns a list of the tasks that were awaiting execution. This method does not wait for actively executing tasks to
terminate. Use There are no guarantees beyond best-effort attempts to stop
processing actively executing tasks. For example, typical
implementations will cancel via
| |
| uncaughtException | back to summary |
|---|---|
| public void uncaughtException(Thread thread, Throwable throwable) Implements java. Doc from java. Method invoked when the given thread terminates due to the given uncaught exception. Any exception thrown by this method will be ignored by the Java Virtual Machine.
| |