Examples of ThreadPool


Examples of org.apache.geronimo.system.threads.ThreadPool

        configStore = new RepositoryConfigurationStore(repo);
        installer = new PluginInstallerGBean(new MockConfigManager(),
                repo,
                configStore,
                serverInfo,
                new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }

            public int getMaximumPoolSize() {
View Full Code Here

Examples of org.apache.geronimo.system.threads.ThreadPool

        fakeRepo = new URL("http://nowhere.com/");
        String url = getClass().getResource("/geronimo-plugins.xml").toString();
        int pos = url.lastIndexOf("/");
        testRepo = new URL(url.substring(0, pos));
        installer = new PluginInstallerGBean(new MockConfigManager(), new MockRepository(), new MockConfigStore(),
                new BasicServerInfo("."), new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }

            public void execute(String consumerName, Runnable runnable) {
View Full Code Here

Examples of org.apache.geronimo.system.threads.ThreadPool

        configStore = new RepositoryConfigurationStore(repo);
        installer = new PluginInstallerGBean(new MockConfigurationManager(),
                repo,
                configStore,
                serverInfo,
                new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }

            public int getMaximumPoolSize() {
View Full Code Here

Examples of org.apache.geronimo.system.threads.ThreadPool

        fakeRepo = "http://nowhere.com/";
        String url = getClass().getResource("/geronimo-plugins.xml").toString();
        int pos = url.lastIndexOf("/");
        testRepo = url.substring(0, pos);
        installer = new PluginInstallerGBean(new MockConfigurationManager(), new MockWritableListableRepository(), new MockConfigStore(),
                new BasicServerInfo("."), new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }

            public int getMaximumPoolSize() {
View Full Code Here

Examples of org.apache.geronimo.system.threads.ThreadPool

        configStore = new RepositoryConfigurationStore(repo);
        installer = new PluginInstallerGBean(new MockConfigurationManager(),
                repo,
                configStore,
                installedPluginsList, serverInfo,
                new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }

            public int getMaximumPoolSize() {
View Full Code Here

Examples of org.apache.geronimo.system.threads.ThreadPool

        String url = getClass().getResource("/geronimo-plugins.xml").toString();
        int pos = url.lastIndexOf("/");
        testRepo = url.substring(0, pos);
        ServerInfo serverInfo = new BasicServerInfo(".");
        installer = new PluginInstallerGBean(new MockConfigurationManager(), new MockWritableListableRepository(), new MockConfigStore(),
                installedPluginsList, serverInfo, new ThreadPool() {
            public int getPoolSize() {
                return 0;
            }

            public int getMaximumPoolSize() {
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPool

        }

        final String name = "ThreadPool-" + UUID.randomUUID().toString() +
             (label == null ? "" : " (" + label + ")");
        final Entry entry = new Entry(null, config, name, bundleContext);
        ThreadPool threadPool = null;
        synchronized ( this.pools ) {
            this.pools.put(name, entry);
            threadPool = entry.incUsage();
        }
        entry.registerMBean();
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPool

     */
    public ThreadPool get(final String name) {
        final String poolName = (name == null ? DEFAULT_THREADPOOL_NAME : name);
        Entry entry = null;
        boolean created = false;
        ThreadPool threadPool = null;
        synchronized (this.pools) {
            entry = this.pools.get(poolName);
            if ( entry == null ) {
                this.logger.debug("Creating new pool with name {}", poolName);
                final ModifiableThreadPoolConfig config = new ModifiableThreadPoolConfig();
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPool

                }
            }

        };
        // check if the thread pool is available
        final ThreadPool pool = Environment.THREAD_POOL;
        if ( pool != null ) {
            pool.execute(task);
        } else {
            // if we don't have a thread pool, we create the thread directly
            // (this should never happen for jobs, but is a safe fallback and
            // allows to call this method for other background processing.
            new Thread(task).start();
View Full Code Here

Examples of org.apache.sling.commons.threads.ThreadPool

                            }
                        }

                    };
                    // check if the thread pool is available
                    final ThreadPool pool = this.threadPool;
                    if ( pool != null ) {
                        pool.execute(task);
                    } else {
                        // if we don't have a thread pool, we create the thread directly
                        // (this should never happen for jobs, but is a safe fall back)
                        new Thread(task).start();
                    }
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.