Package org.apache.oodt.cas.resource.structs.exceptions

Examples of org.apache.oodt.cas.resource.structs.exceptions.JobRepositoryException


    if (spec.getJob() != null) {
      spec.getJob().setId(jobId);
      jobMap.put(jobId, spec);
      return jobId;
    } else
      throw new JobRepositoryException("Exception persisting job: job is null!");
  }
View Full Code Here


   *
   * @see org.apache.oodt.cas.resource.jobrepo.JobRepository#removeJob(org.apache.oodt.cas.resource.structs.JobSpec)
   */
  public void removeJob(JobSpec spec) throws JobRepositoryException {
    if (jobMap.remove(spec.getJob().getId()) == null) {
      throw new JobRepositoryException("Attempt to remove a job: ["
          + spec.getJob().getId() + "] that is not currently persisted");
    }

  }
View Full Code Here

     */
    public int getJobQueueSize() throws JobRepositoryException {
      try {
        return this.scheduler.getJobQueue().getSize();
      }catch (Exception e) {
        throw new JobRepositoryException("Failed to get size of JobQueue : " + e.getMessage(), e);
      }
    }
View Full Code Here

     */
    public int getJobQueueCapacity() throws JobRepositoryException {
      try {
        return this.scheduler.getJobQueue().getCapacity();
      }catch (Exception e) {
        throw new JobRepositoryException("Failed to get capacity of JobQueue : " + e.getMessage(), e);
      }
    }
View Full Code Here

                    .getJobById(jobId);
        } catch (JobRepositoryException e) {
            LOG.log(Level.WARNING,
                    "Exception communicating with job repository for job: ["
                            + jobId + "]: Message: " + e.getMessage());
            throw new JobRepositoryException("Unable to get job: [" + jobId
                    + "] from repository!");
        }

        return XmlRpcStructFactory.getXmlRpcJob(spec.getJob());
    }
View Full Code Here

        try {
            complete = ((Boolean) client.execute("resourcemgr.isJobComplete",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new JobRepositoryException(e.getMessage());
        } catch (IOException e) {
            throw new JobRepositoryException(e.getMessage());
        }

        return complete;
    }
View Full Code Here

        try {
            jobHash = (Hashtable) client.execute("resourcemgr.getJobInfo",
                    argList);
        } catch (XmlRpcException e) {
            throw new JobRepositoryException(e.getMessage());
        } catch (IOException e) {
            throw new JobRepositoryException(e.getMessage());
        }

        return XmlRpcStructFactory.getJobFromXmlRpc(jobHash);
    }
View Full Code Here

    public int getJobQueueSize() throws JobRepositoryException {
        try {
            Vector argList = new Vector();
            return ((Integer) client.execute("resourcemgr.getJobQueueSize", argList));
        } catch (Exception e) {
            throw new JobRepositoryException("Failed to get JobQueue from server : " + e.getMessage(), e);
        }
    }
View Full Code Here

    public int getJobQueueCapacity() throws JobRepositoryException {
        try {
            Vector argList = new Vector();
            return ((Integer) client.execute("resourcemgr.getJobQueueCapacity", argList));
        } catch (Exception e) {
            throw new JobRepositoryException("Failed to get JobQueue capacity from server : " + e.getMessage(), e);
        }
    }
View Full Code Here

        try {
            complete = ((Boolean) client.execute("resourcemgr.isJobComplete",
                    argList)).booleanValue();
        } catch (XmlRpcException e) {
            throw new JobRepositoryException(e.getMessage(), e);
        } catch (IOException e) {
            throw new JobRepositoryException(e.getMessage(), e);
        }

        return complete;
    }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.resource.structs.exceptions.JobRepositoryException

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.