Package ca.eandb.util.concurrent

Examples of ca.eandb.util.concurrent.BackgroundThreadFactory


      courtesyMonitor = exec;
    } else {
      courtesyMonitor = new UnconditionalCourtesyMonitor();
    }

    ThreadFactory threadFactory = new BackgroundThreadFactory();
    ProgressStateFactory monitorFactory = new ProgressStateFactory();
    worker = new ThreadServiceWorker(serviceFactory, threadFactory, monitorFactory, courtesyMonitor);
    worker.setMaxWorkers(numberOfCpus);

    taskProgressStates = monitorFactory.getProgressStates();
View Full Code Here


   *     create <code>ProgressMonitor</code>s for worker tasks.
   * @param monitor The <code>ProgressMonitor</code> to report overall job
   *     progress to.
   */
  public ParallelizableJobRunner(ParallelizableJob job, File workingDirectory, int maxConcurrentWorkers, ProgressMonitorFactory monitorFactory, ProgressMonitor monitor) {
    this(job, workingDirectory, Executors.newFixedThreadPool(maxConcurrentWorkers, new BackgroundThreadFactory()), maxConcurrentWorkers, monitorFactory, monitor);
  }
View Full Code Here

   * @param workingDirectory The working directory for the job.
   * @param maxConcurrentWorkers The maximum number of concurrent tasks to
   *     process.
   */
  public ParallelizableJobRunner(ParallelizableJob job, File workingDirectory, int maxConcurrentWorkers) {
    this(job, workingDirectory, Executors.newFixedThreadPool(maxConcurrentWorkers, new BackgroundThreadFactory()), maxConcurrentWorkers);
  }
View Full Code Here

    File base = new File("C:\\Users\\Brad\\My Documents\\jmist");
    UUID id = UUID.randomUUID();
    File dir = new File(base, id.toString());

    Runnable runner = new ParallelizableJobRunner(job, dir, Executors.newFixedThreadPool(threads, new BackgroundThreadFactory()), threads, panel, panel.createProgressMonitor("Rendering Cornell Box"));//Runtime.getRuntime().availableProcessors());
    runner.run();

  }
View Full Code Here

   *     create <code>ProgressMonitor</code>s for individual jobs.
   * @param scheduler The <code>TaskScheduler</code> to use to assign
   *     tasks.
   */
  public TemporaryJobServer(ProgressMonitorFactory monitorFactory, TaskScheduler scheduler) throws IllegalArgumentException {
    this(monitorFactory, scheduler, Executors.newCachedThreadPool(new BackgroundThreadFactory()));
  }
View Full Code Here

   *     tasks.
   * @param classManager The <code>ParentClassManager</code> to use to
   *     store and retrieve class definitions.
   */
  public JobServer(File outputDirectory, ProgressMonitorFactory monitorFactory, TaskScheduler scheduler, ParentClassManager classManager) throws IllegalArgumentException {
    this(outputDirectory, monitorFactory, scheduler, classManager, Executors.newCachedThreadPool(new BackgroundThreadFactory()));
  }
View Full Code Here

    setStatus("Starting worker...");

    CourtesyMonitor courtesyMonitor = (powerMonitor != null) ? powerMonitor
        : new UnconditionalCourtesyMonitor();
    ThreadFactory threadFactory = new BackgroundThreadFactory();
    worker = new ThreadServiceWorker(serviceFactory, threadFactory,
        getProgressPanel(), courtesyMonitor);
    worker.setMaxWorkers(options.numberOfCpus);

    boolean cacheClassDefinitions = pref.getBoolean("cacheClassDefinitions", true);
View Full Code Here

TOP

Related Classes of ca.eandb.util.concurrent.BackgroundThreadFactory

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.