Examples of TaskThreadFactory


Examples of com.sun.grid.installer.task.TaskThreadFactory

        setupComponentSelectionPanel();
        setColumnsWidth();

        if (threadPool == null) {
            threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(Util.RESOLVE_THREAD_POOL_SIZE);
            threadPool.setThreadFactory(new TaskThreadFactory());
            observer.setThreadPoolExecutors(threadPool);
        }

        VariableSubstitutor vs = new VariableSubstitutor(idata.getVariables());
View Full Code Here

Examples of com.sun.grid.installer.task.TaskThreadFactory

            }

            try {
                if (waitingTasks.size() > 0) {
                    ThreadPoolExecutor tmp = (ThreadPoolExecutor) Executors.newFixedThreadPool(waitingTasks.size() * 2);
                    tmp.setThreadFactory(new TaskThreadFactory());

                    for (Iterator<Runnable> it = waitingTasks.iterator(); it.hasNext();) {
                        TestableTask runnable = (TestableTask) it.next();
                        runnable.setTestMode(true);
                        runnable.setTestExitValue(EXIT_VAL_CMDEXEC_INTERRUPTED);
View Full Code Here

Examples of com.sun.grid.installer.task.TaskThreadFactory

        HostTable table = tables.get(0);
        HostSelectionTableModel model = (HostSelectionTableModel) table.getModel();

        if (threadPool.isShutdown()) {
            threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(Util.RESOLVE_THREAD_POOL_SIZE);
            threadPool.setThreadFactory(new TaskThreadFactory());

            observer.setThreadPoolExecutors(threadPool);
        }

        observer.observe();
View Full Code Here

Examples of com.sun.grid.installer.task.TaskThreadFactory

            Debug.error(e);
        }

        //Initialize new threadPool for the installation
        threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(Util.INSTALL_THREAD_POOL_SIZE);
        threadPool.setThreadFactory(new TaskThreadFactory());       

        try {
            long started = 0;
            Host h;
            for (int i : indexList) {
View Full Code Here

Examples of com.sun.grid.installer.task.TaskThreadFactory

    }

    private void startInstallation(HostList installList, final List<String> possibleAdminHosts, final List<String> adminHosts, final List<String> submitHosts, final List<String> allHosts, final List<String> allConnectUsers, final List<String> allShadowHosts, final List<String> allShadowConnectUsers) {
        //Initialize new threadPool for the installation
        threadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(Util.INSTALL_THREAD_POOL_SIZE);
        threadPool.setThreadFactory(new TaskThreadFactory());
        //We need a new executor for shadowdTasks (only 1 task at single moment)
        singleThreadPool = (ThreadPoolExecutor) Executors.newFixedThreadPool(1);
        singleThreadPool.setThreadFactory(new TaskThreadFactory());

        observer.setThreadPoolExecutors(new ThreadPoolExecutor[]{threadPool, singleThreadPool});
        observer.setTaskCount(installList.size());
        observer.observe();
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskThreadFactory


    public void createExecutor() {
        internalExecutor = true;
        TaskQueue taskqueue = new TaskQueue();
        TaskThreadFactory tf = new TaskThreadFactory(getName() + "-exec-", daemon, getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), 60, TimeUnit.SECONDS,taskqueue, tf);
        taskqueue.setParent( (ThreadPoolExecutor) executor);
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskThreadFactory


    public void createExecutor() {
        internalExecutor = true;
        TaskQueue taskqueue = new TaskQueue();
        TaskThreadFactory tf = new TaskThreadFactory(getName() + "-exec-", daemon, getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), 60, TimeUnit.SECONDS,taskqueue, tf);
        taskqueue.setParent( (ThreadPoolExecutor) executor);
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskThreadFactory

     */
    @Override
    protected void startInternal() throws LifecycleException {

        taskqueue = new TaskQueue(maxQueueSize);
        TaskThreadFactory tf = new TaskThreadFactory(namePrefix,daemon,getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), maxIdleTime, TimeUnit.MILLISECONDS,taskqueue, tf);
        executor.setThreadRenewalDelay(threadRenewalDelay);
        if (prestartminSpareThreads) {
            executor.prestartAllCoreThreads();
        }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskThreadFactory


    public void createExecutor() {
        internalExecutor = true;
        TaskQueue taskqueue = new TaskQueue();
        TaskThreadFactory tf = new TaskThreadFactory(getName() + "-exec-", daemon, getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), 60, TimeUnit.SECONDS,taskqueue, tf);
        taskqueue.setParent( (ThreadPoolExecutor) executor);
    }
View Full Code Here

Examples of org.apache.tomcat.util.threads.TaskThreadFactory


    public void createExecutor() {
        internalExecutor = true;
        TaskQueue taskqueue = new TaskQueue();
        TaskThreadFactory tf = new TaskThreadFactory(getName() + "-exec-", daemon, getThreadPriority());
        executor = new ThreadPoolExecutor(getMinSpareThreads(), getMaxThreads(), 60, TimeUnit.SECONDS,taskqueue, tf);
        taskqueue.setParent( (ThreadPoolExecutor) executor);
    }
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.