Package org.atmosphere.util
Class ExecutorsFactory
java.lang.Object
org.atmosphere.util.ExecutorsFactory
Factory to create
ExecutorService for Atmosphere components.
Uses Virtual Threads (JDK 21+) by default for unlimited scalability.-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutorServicegetAsyncOperationExecutor(AtmosphereConfig config, String name) Create anExecutorServicefor async I/O operations.static ExecutorServicegetMessageDispatcher(AtmosphereConfig config, String name) Create anExecutorServiceto be used for dispatching messages.static ScheduledExecutorServicegetScheduler(AtmosphereConfig config) Create aScheduledExecutorServicefor scheduled tasks.static voidreset(AtmosphereConfig config)
-
Field Details
-
DEFAULT_ASYNC_THREAD
public static final int DEFAULT_ASYNC_THREAD- See Also:
-
DEFAULT_MESSAGE_THREAD
public static final int DEFAULT_MESSAGE_THREAD- See Also:
-
DEFAULT_KEEP_ALIVE
public static final int DEFAULT_KEEP_ALIVE- See Also:
-
ASYNC_WRITE_THREAD_POOL
- See Also:
-
SCHEDULER_THREAD_POOL
- See Also:
-
BROADCASTER_THREAD_POOL
- See Also:
-
-
Constructor Details
-
ExecutorsFactory
public ExecutorsFactory()
-
-
Method Details
-
getMessageDispatcher
Create anExecutorServiceto be used for dispatching messages. Uses Virtual Threads by default for unlimited scalability. -
getAsyncOperationExecutor
Create anExecutorServicefor async I/O operations. Uses Virtual Threads by default - perfect for I/O-bound work. -
getScheduler
Create aScheduledExecutorServicefor scheduled tasks. -
reset
-