Package com.sun.grid.jam.job.entry

Examples of com.sun.grid.jam.job.entry.JobControlEntry


                                     userProperties.getLogin(),
                                     new Random().nextInt());
          JobParams jp = new JobParams(info, -1,
                                       appParams.getScript(),
                                       appParams.getArgs());
          JobControlEntry jce = new JobControlEntry(info,
                                                    JobStatus.UNKNOWN,
                                                    JobAction.QUEUE,
                                                    jobAttr);
          space.write(info, txn, Lease.FOREVER);
          space.write(jp, txn, Lease.FOREVER);
View Full Code Here


  private void submit()
  {
    try {
      Transaction txn = createTransaction(10 * 1000);
      try {
        JobControlEntry jce = (JobControlEntry)
          space.takeIfExists(controlEntry, txn, JavaSpace.NO_WAIT);
        submit(jce, txn);
      } catch(Exception ex) {
        System.out.println("--RMServer: Submit aborted " + ex);
      }
View Full Code Here

  private void destroyJobService()
  {
    try {
      Transaction txn = createTransaction(5 * 1000);
      try {
        JobControlEntry jce = (JobControlEntry)
          space.takeIfExists(killAction,
                             txn, JavaSpace.NO_WAIT);
        jce.jobStatus = JobStatus.KILLED;
        jce.jobAction = JobAction.NONE;
        space.write(jce, txn, Lease.FOREVER);
View Full Code Here

    this.jobInfo = jobInfo;
    this.space = space;
    this.observer = observer;
    try {
      jpSnapshot = space.snapshot(new JobParams(jobInfo));
      jceSnapshot = space.snapshot(new JobControlEntry(jobInfo));
    } catch(Exception e) {
      throw new RemoteException(e.toString());  
    }
  }
View Full Code Here

    return jp;
  }
 
  public JobControlEntry getJobControlEntry()
  {
    JobControlEntry jce = null;
    try {
      jce = (JobControlEntry)space.read(jceSnapshot, null,
                                        JavaSpace.NO_WAIT);
    } catch(Exception e) {
      System.out.println(e.toString());
View Full Code Here

      entry = new JobParams();
      do {
        ob = server.space.take(entry, null,
                               JavaSpace.NO_WAIT);
      } while(ob != null);
      entry = new JobControlEntry();
      do {
        ob = server.space.take(entry, null,
                               JavaSpace.NO_WAIT);
      } while(ob != null);
    } catch(Exception ex) {
View Full Code Here

  {
    try {
      if(txn == null)
        txn = createTransaction(10 * 1000);
      try {
        JobControlEntry jce =
          (JobControlEntry)space.takeIfExists(jceSnapshot, txn,
                                              JavaSpace.NO_WAIT);
        if(jce == null) {
          txn.abort();
          throw new RemoteException("No JobControlEntry in JavaSpace");
View Full Code Here

      execHost = queue.getExecHost();

      // Add queue-specific JobRepository listeners
      if(server.space != null) {
  server.controlEntry = server.space.snapshot
    (new JobControlEntry(JobAction.QUEUE, queue.getName()));

  server.killAction = server.space.snapshot
    (new JobControlEntry(JobAction.KILL, queue.getName()));

  server.leaseList.add(server.space.notify(server.controlEntry, null,
             server.creatorListener,
             Lease.FOREVER, null).getLease());
  server.leaseList.add(server.space.notify(server.killAction, null,
View Full Code Here

    super();
    this.nativeAdapter = nativeAdapter;
    this.space = space;
    job = new SGEJob(jobName, jobID);
    try {
      jControl = space.snapshot(new JobControlEntry(jobInfo));
    } catch(RemoteException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

          terminate();
        }
        Transaction txn = null;
        try {
          txn = createTransaction(5 * 1000);
          JobControlEntry jce =
            (JobControlEntry)space.readIfExists(jControl, null,
                                                JavaSpace.NO_WAIT);
          if((st == null) || (jce == null)) {
            continue;
          }
View Full Code Here

TOP

Related Classes of com.sun.grid.jam.job.entry.JobControlEntry

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.