public class ExecutorsFactory
extends java.lang.Object
ExecutorService used in all Atmosphere Component. By default they are
shared amongst all component. To change the behavior, add ApplicationConfig.BROADCASTER_SHARABLE_THREAD_POOLS| Modifier and Type | Class and Description |
|---|---|
static class |
ExecutorsFactory.AtmosphereThreadFactory |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ASYNC_WRITE_THREAD_POOL |
static java.lang.String |
BROADCASTER_THREAD_POOL |
static int |
DEFAULT_ASYNC_THREAD |
static int |
DEFAULT_KEEP_ALIVE |
static int |
DEFAULT_MESSAGE_THREAD |
static java.lang.String |
SCHEDULER_THREAD_POOL |
| Constructor and Description |
|---|
ExecutorsFactory() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.concurrent.ExecutorService |
getAsyncOperationExecutor(AtmosphereConfig config,
java.lang.String name)
Create an
ExecutorService to be used for dispatching I/O events. |
static java.util.concurrent.ExecutorService |
getMessageDispatcher(AtmosphereConfig config,
java.lang.String name)
Create an
ExecutorService to be used for dispatching messages, not I/O events. |
static java.util.concurrent.ScheduledExecutorService |
getScheduler(AtmosphereConfig config)
Create a
ScheduledExecutorService used ot schedule I/O and non I/O events. |
static void |
reset(AtmosphereConfig config) |
public static final int DEFAULT_ASYNC_THREAD
public static final int DEFAULT_MESSAGE_THREAD
public static final int DEFAULT_KEEP_ALIVE
public static final java.lang.String ASYNC_WRITE_THREAD_POOL
public static final java.lang.String SCHEDULER_THREAD_POOL
public static final java.lang.String BROADCASTER_THREAD_POOL
public static java.util.concurrent.ExecutorService getMessageDispatcher(AtmosphereConfig config, java.lang.String name)
ExecutorService to be used for dispatching messages, not I/O events.config - the AtmosphereConfigname - a name to use if shared is false.ExecutorServicepublic static java.util.concurrent.ExecutorService getAsyncOperationExecutor(AtmosphereConfig config, java.lang.String name)
ExecutorService to be used for dispatching I/O events.config - the AtmosphereConfigname - a name to use if shared is false.ExecutorServicepublic static java.util.concurrent.ScheduledExecutorService getScheduler(AtmosphereConfig config)
ScheduledExecutorService used ot schedule I/O and non I/O events.config - the AtmosphereConfigScheduledExecutorServicepublic static void reset(AtmosphereConfig config)
Copyright © 2024. All Rights Reserved.