public class ReactorStreamProcessingStrategyFactory extends AbstractProcessingStrategyFactory
ReactorStreamProcessingStrategyFactory instances that implements the reactor pattern by de-multiplexes incoming
messages onto a single event-loop using a ring-buffer and then using using the SchedulerService.cpuLightScheduler() to
process events from the ring-buffer.
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 |
|---|
ReactorStreamProcessingStrategyFactory() |
| 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 ReactorStreamProcessingStrategyFactory()
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.