Package org.apache.camel.util.concurrent

Examples of org.apache.camel.util.concurrent.SynchronousExecutorService


        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (threadPool == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            threadPool = new SynchronousExecutorService();
            shutdownThreadPool = true;
        }

        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), internal,
                correlation, strategy, threadPool, shutdownThreadPool);
View Full Code Here


        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (threadPool == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            threadPool = new SynchronousExecutorService();
            shutdownThreadPool = true;
        }

        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), internal,
                correlation, strategy, threadPool, shutdownThreadPool);
View Full Code Here

        executorService = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (executorService == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            executorService = new SynchronousExecutorService();
        }
      
        if (timeoutCheckerExecutorServiceRef != null && timeoutCheckerExecutorService == null) {
            timeoutCheckerExecutorService = getConfiguredScheduledExecutorService(routeContext);
        }
View Full Code Here

        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (threadPool == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            threadPool = new SynchronousExecutorService();
            shutdownThreadPool = true;
        }

        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), processor,
                correlation, strategy, threadPool, shutdownThreadPool);
View Full Code Here

    public ExecutorService newSingleThreadExecutor(Object source, String name) {
        return camelContext.getExecutorServiceManager().newSingleThreadExecutor(source, name);
    }

    public ExecutorService newSynchronousThreadPool(Object source, String name) {
        return new SynchronousExecutorService();
    }
View Full Code Here

        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (threadPool == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            threadPool = new SynchronousExecutorService();
            shutdownThreadPool = true;
        }

        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), processor,
                correlation, strategy, threadPool, shutdownThreadPool);
View Full Code Here

            ExecutorServiceManager executorServiceManager = routeContext.getCamelContext().getExecutorServiceManager();
            if (isParallelProcessing()) {
                executorService = executorServiceManager.newDefaultThreadPool(this, "Aggregator");
            } else {
                // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
                executorService = new SynchronousExecutorService();
            }
        }
        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), processor, correlation, strategy, executorService);

        AggregationRepository repository = createAggregationRepository(routeContext);
View Full Code Here

    public ExecutorService newSingleThreadExecutor(Object source, String name) {
        return camelContext.getExecutorServiceManager().newSingleThreadExecutor(source, name);
    }

    public ExecutorService newSynchronousThreadPool(Object source, String name) {
        return new SynchronousExecutorService();
    }
View Full Code Here

        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (threadPool == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            threadPool = new SynchronousExecutorService();
            shutdownThreadPool = true;
        }

        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), internal,
                correlation, strategy, threadPool, shutdownThreadPool);
View Full Code Here

        boolean shutdownThreadPool = ProcessorDefinitionHelper.willCreateNewThreadPool(routeContext, this, isParallelProcessing());
        ExecutorService threadPool = ProcessorDefinitionHelper.getConfiguredExecutorService(routeContext, "Aggregator", this, isParallelProcessing());
        if (threadPool == null && !isParallelProcessing()) {
            // executor service is mandatory for the Aggregator
            // we do not run in parallel mode, but use a synchronous executor, so we run in current thread
            threadPool = new SynchronousExecutorService();
            shutdownThreadPool = true;
        }

        AggregateProcessor answer = new AggregateProcessor(routeContext.getCamelContext(), processor,
                correlation, strategy, threadPool, shutdownThreadPool);
View Full Code Here

TOP

Related Classes of org.apache.camel.util.concurrent.SynchronousExecutorService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.