Examples of newThreadPool()


Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

        // lookup in registry first and use existing thread pool if exists
        ExecutorService answer = routeContext.getCamelContext().getRegistry().lookupByNameAndType(executorServiceRef, ExecutorService.class);
        if (answer == null) {
            // then create a thread pool assuming the ref is a thread pool profile id
            answer = manager.newThreadPool(source, name, executorServiceRef);
        }
        return answer;
    }

    /**
 
View Full Code Here

Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

        } else if (definition.getExecutorServiceRef() != null) {
            // lookup in registry first and use existing thread pool if exists
            ExecutorService answer = routeContext.getCamelContext().getRegistry().lookup(definition.getExecutorServiceRef(), ExecutorService.class);
            if (answer == null) {
                // then create a thread pool assuming the ref is a thread pool profile id
                answer = manager.newThreadPool(definition, name, definition.getExecutorServiceRef());
            }
            if (answer == null) {
                throw new NoSuchBeanException(definition.getExecutorServiceRef(), "ExecutorService");
            }
            return answer;
View Full Code Here

Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

                    .maxPoolSize(getMaxPoolSize())
                    .keepAliveTime(getKeepAliveTime(), getTimeUnit())
                    .maxQueueSize(getMaxQueueSize())
                    .rejectedPolicy(getRejectedPolicy())
                    .build();
            threadPool = manager.newThreadPool(this, name, profile);
            shutdownThreadPool = true;
        } else {
            if (getThreadName() != null && !getThreadName().equals("Threads")) {
                throw new IllegalArgumentException("ThreadName and executorServiceRef options cannot be used together.");
            }
View Full Code Here

Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

        // lookup in registry first and use existing thread pool if exists
        ExecutorService answer = routeContext.getCamelContext().getRegistry().lookupByNameAndType(executorServiceRef, ExecutorService.class);
        if (answer == null) {
            // then create a thread pool assuming the ref is a thread pool profile id
            answer = manager.newThreadPool(source, name, executorServiceRef);
        }
        return answer;
    }

    /**
 
View Full Code Here

Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

                    .maxPoolSize(getMaxPoolSize())
                    .keepAliveTime(getKeepAliveTime(), getTimeUnit())
                    .maxQueueSize(getMaxQueueSize())
                    .rejectedPolicy(getRejectedPolicy())
                    .build();
            executorService = manager.newThreadPool(this, name, profile);
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), executorService);
        if (getCallerRunsWhenRejected() == null) {
            // should be true by default
View Full Code Here

Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

        // lookup in registry first and use existing thread pool if exists
        ExecutorService answer = routeContext.getCamelContext().getRegistry().lookupByNameAndType(executorServiceRef, ExecutorService.class);
        if (answer == null) {
            // then create a thread pool assuming the ref is a thread pool profile id
            answer = manager.newThreadPool(source, name, executorServiceRef);
        }
        return answer;
    }

    /**
 
View Full Code Here

Examples of org.apache.camel.spi.ExecutorServiceManager.newThreadPool()

        // lookup in registry first and use existing thread pool if exists
        ExecutorService answer = routeContext.getCamelContext().getRegistry().lookupByNameAndType(executorServiceRef, ExecutorService.class);
        if (answer == null) {
            // then create a thread pool assuming the ref is a thread pool profile id
            answer = manager.newThreadPool(source, name, executorServiceRef);
        }
        return answer;
    }

    /**
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.