Search in sources :

Example 1 with SchedulerConfig

use of org.mule.runtime.api.scheduler.SchedulerConfig in project mule by mulesoft.

the class TransactionAwareWorkQueueProcessingStrategyFactory method create.

@Override
public ProcessingStrategy create(MuleContext muleContext, String schedulersNamePrefix) {
    SchedulerConfig schedulerConfig = muleContext.getSchedulerBaseConfig().withName(schedulersNamePrefix + "." + BLOCKING.name());
    if (getMaxConcurrency() != MAX_VALUE) {
        schedulerConfig = schedulerConfig.withMaxConcurrentTasks(getMaxConcurrency());
    }
    SchedulerConfig finalSchedulerConfig = schedulerConfig;
    return new TransactionAwareWorkQueueProcessingStrategy(() -> muleContext.getSchedulerService().ioScheduler(finalSchedulerConfig));
}
Also used : SchedulerConfig(org.mule.runtime.api.scheduler.SchedulerConfig)

Aggregations

SchedulerConfig (org.mule.runtime.api.scheduler.SchedulerConfig)1