Examples of newThreadPool()


Examples of com.sun.sgs.nio.channels.ThreadPoolFactory.newThreadPool()

     */
    private AsyncGroupImpl defaultGroup() throws IOException {
        synchronized (this) {
            if (defaultGroupInstance == null) {
                ThreadPoolFactory tpf = getThreadPoolFactory();
                ExecutorService executor = tpf.newThreadPool();
                defaultGroupInstance = openAsynchronousChannelGroup(executor);
                defaultGroupInstance.uncaughtHandler = defaultUncaughtHandler;
                defaultUncaughtHandler = null;
            }
            return defaultGroupInstance;
View Full Code Here

Examples of com.sun.sgs.nio.channels.ThreadPoolFactory.newThreadPool()

     */
    private AsyncGroupImpl defaultGroup() throws IOException {
        synchronized (this) {
            if (defaultGroupInstance == null) {
                ThreadPoolFactory tpf = getThreadPoolFactory();
                ExecutorService executor = tpf.newThreadPool();
                defaultGroupInstance = openAsynchronousChannelGroup(executor);
                defaultGroupInstance.uncaughtHandler = defaultUncaughtHandler;
                defaultUncaughtHandler = null;
            }
            return defaultGroupInstance;
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()

        } 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 IllegalArgumentException("ExecutorServiceRef " + definition.getExecutorServiceRef() + " not found in registry or as a thread pool profile.");
            }
            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().lookup(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();
            threadPool = manager.newThreadPool(this, name, profile);
            shutdownThreadPool = true;
        }

        ThreadsProcessor thread = new ThreadsProcessor(routeContext.getCamelContext(), threadPool, shutdownThreadPool);
        if (getCallerRunsWhenRejected() == null) {
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().lookup(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()

        // 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.