public class ExecutorsFactory extends 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 String |
ASYNC_WRITE_THREAD_POOL |
static String |
BROADCASTER_THREAD_POOL |
static int |
DEFAULT_ASYNC_THREAD |
static int |
DEFAULT_KEEP_ALIVE |
static int |
DEFAULT_MESSAGE_THREAD |
static String |
SCHEDULER_THREAD_POOL |
Constructor and Description |
---|
ExecutorsFactory() |
Modifier and Type | Method and Description |
---|---|
static ExecutorService |
getAsyncOperationExecutor(AtmosphereConfig config,
String name)
Create an
ExecutorService to be used for dispatching I/O events. |
static ExecutorService |
getMessageDispatcher(AtmosphereConfig config,
String name)
Create an
ExecutorService to be used for dispatching messages, not I/O events. |
static 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 String ASYNC_WRITE_THREAD_POOL
public static final String SCHEDULER_THREAD_POOL
public static final String BROADCASTER_THREAD_POOL
public static ExecutorService getMessageDispatcher(AtmosphereConfig config, String name)
ExecutorService
to be used for dispatching messages, not I/O events.config
- the AtmosphereConfig
name
- a name to use if shared is false.ExecutorService
public static ExecutorService getAsyncOperationExecutor(AtmosphereConfig config, String name)
ExecutorService
to be used for dispatching I/O events.config
- the AtmosphereConfig
name
- a name to use if shared is false.ExecutorService
public static ScheduledExecutorService getScheduler(AtmosphereConfig config)
ScheduledExecutorService
used ot schedule I/O and non I/O events.config
- the AtmosphereConfig
ScheduledExecutorService
public static final void reset(AtmosphereConfig config)
Copyright © 2016. All rights reserved.