Top Description Fields Constructors Methods
ch.qos.logback.core.util

public Class ExecutorServiceUtil

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException, .Method, java.util.concurrent.ExecutorService, .Executors, .ScheduledExecutorService, .ScheduledThreadPoolExecutor, .SynchronousQueue, .ThreadFactory, .ThreadPoolExecutor, .TimeUnit, java.util.concurrent.atomic.AtomicInteger, ch.qos.logback.core.CoreConstants

Static utility methods for manipulating an ExecutorService.
Authors
Carl Harris, Mikhail Mazursky

Field Summary

Modifier and TypeField and Description
private static final ThreadFactory

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static ExecutorService
newAlternateThreadPoolExecutor()

An alternate implementation of {@linl #newThreadPoolExecutor} which returns a virtual thread per task executor when available.

public static ExecutorService
public static ScheduledExecutorService
public static ThreadPoolExecutor

Returns:

ThreadPoolExecutor
newThreadPoolExecutor
()

Creates an ThreadPoolExecutor suitable for use by logback components.

public static void
shutdown(ExecutorService
the executor service to shut down
executorService
)

Shuts down an executor service.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

THREAD_FACTORY_FOR_SCHEDULED_EXECUTION_SERVICEback to summary
private static final ThreadFactory THREAD_FACTORY_FOR_SCHEDULED_EXECUTION_SERVICE

Constructor Detail

ExecutorServiceUtilback to summary
public ExecutorServiceUtil()

Method Detail

newAlternateThreadPoolExecutorback to summary
public static ExecutorService newAlternateThreadPoolExecutor()

An alternate implementation of {@linl #newThreadPoolExecutor} which returns a virtual thread per task executor when available.

Since
1.3.12/1.4.12
newExecutorServiceback to summary
public static ExecutorService newExecutorService()

Deprecated

replaced by newThreadPoolExecutor()

newScheduledExecutorServiceback to summary
public static ScheduledExecutorService newScheduledExecutorService()
newThreadPoolExecutorback to summary
public static ThreadPoolExecutor newThreadPoolExecutor()

Creates an ThreadPoolExecutor suitable for use by logback components.

Returns:ThreadPoolExecutor

ThreadPoolExecutor

Since
1.4.7
shutdownback to summary
public static void shutdown(ExecutorService executorService)

Shuts down an executor service.

Parameters
executorService:ExecutorService

the executor service to shut down