Package ca.eandb.util.progress

Examples of ca.eandb.util.progress.ProgressMonitor


  /**
   * Gets an available <code>ProgressMonitor</code> to use for the next task.
   * @return An available <code>ProgressMonitor</code>.
   */
  private synchronized ProgressMonitor getWorkerProgressMonitor() {
    ProgressMonitor monitor;
    if (numProgressMonitors < maxConcurrentWorkers) {
      String title = String.format("Worker (%d)", numProgressMonitors++);
      monitor = new PermanentProgressMonitor(monitorFactory.createProgressMonitor(title));
    } else {
      monitor = workerMonitorQueue.remove();
View Full Code Here


  /* (non-Javadoc)
   * @see ca.eandb.jdcp.remote.JobService#createJob(java.lang.String)
   */
  public UUID createJob(String description) throws SecurityException {
    ProgressMonitor monitor = monitorFactory.createProgressMonitor(description);
    ScheduledJob sched = new ScheduledJob(description, monitor);
    jobs.put(sched.id, sched);
    monitor.addCancelListener(new JobCancelListener(sched.id));

    if (logger.isInfoEnabled()) {
      logger.info("Job created (" + sched.id.toString() + "): " + description);
    }

View Full Code Here

  /* (non-Javadoc)
   * @see ca.eandb.jdcp.remote.JobService#submitJob(ca.eandb.util.rmi.Envelope, java.lang.String)
   */
  public UUID submitJob(Serialized<ParallelizableJob> job, String description)
      throws SecurityException, ClassNotFoundException, JobExecutionException {
    ProgressMonitor monitor = monitorFactory.createProgressMonitor(description);
    ScheduledJob sched = new ScheduledJob(description, monitor);
    jobs.put(sched.id, sched);
    monitor.addCancelListener(new JobCancelListener(sched.id));

    try {
      ServerUtil.setHostService(sched);
      sched.initializeJob(job);
      sched.scheduleNextTask();
View Full Code Here

TOP

Related Classes of ca.eandb.util.progress.ProgressMonitor

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.