Package com.sun.grid.installer.task

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


                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);
                        runnable.setTestOutput(new Vector<String>());
                        try {
                            Debug.trace("Cancel task: " + runnable.getTaskName());
                            tmp.execute(runnable);
                            tmp.remove(runnable);
                        } catch (Exception e) {
                            Debug.error("Failed to cancel task: " + runnable.getTaskName());
                        }
                    }
                }
            } catch (Exception e) {
                e.printStackTrace();
View Full Code Here

TOP

Related Classes of com.sun.grid.installer.task.TestableTask

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.