Package ca.eandb.jdcp.remote

Examples of ca.eandb.jdcp.remote.JobStatus


      this.classManager    = JobServer.this.classManager.createChildClassManager();

      this.workingDirectory  = new File(outputDirectory, id.toString());

      setJobStatus(new JobStatus(id, description, JobState.NEW, 0.0,
          "Awaiting job submission"));

    }
View Full Code Here


   * @param _newStatus The new <code>JobStatus</code> event.
   */
  private synchronized void updateStatus(JobStatus _newStatus) {

    // generate a new event ID (always increasing).
    JobStatus newStatus = _newStatus.withNewEventId();

    UUID jobId = newStatus.getJobId();

    // remove the last event for the same job, as it is no longer relevant.
    JobStatus oldStatus = statusByJobId.get(jobId);
    if (oldStatus != null) {
      statusByEventId.remove(oldStatus.getEventId());
    }

    // insert event into lookup tables.
    statusByEventId.put(newStatus.getEventId(), newStatus);
    statusByJobId.put(jobId, newStatus);
View Full Code Here

    // if the job is no longer active, it could be that the caller has not
    // yet received the COMPLETE/CANCELLED status, which will still be in
    // the lookup.
    if (sched == null) {
      JobStatus status = statusByJobId.get(jobId);
      if (status == null || lastEventId >= status.getEventId()) {
        // the job either never existed, or the caller has already seen
        // the COMPLETE event for this job.
        throw new IllegalArgumentException("Invalid Job ID");
      }
      return status;
View Full Code Here

TOP

Related Classes of ca.eandb.jdcp.remote.JobStatus

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.