public class WorkQueueStreamProcessingStrategyFactory extends AbstractProcessingStrategyFactory
WorkQueueStreamProcessingStrategy instances that de-multiplexes incoming messages using a ring-buffer but
instead of processing events using a constrained SchedulerService.cpuLightScheduler(), or by using the proactor
pattern, instead simply performs all processing on a larger work queue pool using a fixed number of threads from the
SchedulerService.ioScheduler().
This processing strategy is not suitable for transactional flows and will fail if used with an active transaction.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractStreamProcessingStrategyFactory.AbstractStreamProcessingStrategy
Abstract
ProcessingStrategy to be used by implementations that de-multiplex incoming messages using a ring-buffer
which can then be subscribed to n times. |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE |
static int |
DEFAULT_SUBSCRIBER_COUNT |
static String |
DEFAULT_WAIT_STRATEGY |
protected static String |
RING_BUFFER_SCHEDULER_NAME_SUFFIX |
| Constructor and Description |
|---|
WorkQueueStreamProcessingStrategyFactory() |
| Modifier and Type | Method and Description |
|---|---|
ProcessingStrategy |
create(MuleContext muleContext,
String schedulersNamePrefix) |
protected int |
getBufferSize() |
protected int |
getSubscriberCount() |
protected String |
getWaitStrategy() |
void |
setBufferSize(int bufferSize)
Configure the size of the ring-buffer size used to buffer and de-multiplexes events from multiple source threads.
|
void |
setSubscriberCount(int subscriberCount)
Configure the number of ring-buffer subscribers.
|
void |
setWaitStrategy(String waitStrategy)
Configure the wait strategy used to wait for new events on ring-buffer.
|
getMaxConcurrency, setMaxConcurrencypublic static final int DEFAULT_BUFFER_SIZE
public static final int DEFAULT_SUBSCRIBER_COUNT
public static final String DEFAULT_WAIT_STRATEGY
protected static String RING_BUFFER_SCHEDULER_NAME_SUFFIX
public WorkQueueStreamProcessingStrategyFactory()
public ProcessingStrategy create(MuleContext muleContext, String schedulersNamePrefix)
ProcessingStrategy.public void setBufferSize(int bufferSize)
bufferSize - buffer size to use.public void setSubscriberCount(int subscriberCount)
subscriberCount - public void setWaitStrategy(String waitStrategy)
waitStrategy - protected int getBufferSize()
protected int getSubscriberCount()
protected String getWaitStrategy()
Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.