extensions/net.sf.basedb.opengrid/trunk/src/net/sf/basedb/opengrid/engine/JobSubmission.java

Code
Comments
Other
Rev Date Author Line
5982 07 Jul 20 nicklas 1 package net.sf.basedb.opengrid.engine;
5982 07 Jul 20 nicklas 2
5982 07 Jul 20 nicklas 3 import java.util.List;
5982 07 Jul 20 nicklas 4
5982 07 Jul 20 nicklas 5 import net.sf.basedb.opengrid.filetransfer.UploadSource;
5982 07 Jul 20 nicklas 6
5982 07 Jul 20 nicklas 7 /**
5982 07 Jul 20 nicklas 8   Represents a job submission for sending a job to the cluster.
5982 07 Jul 20 nicklas 9   The job submission consists of a command that should be exuected
5982 07 Jul 20 nicklas 10   in order to add the job to queue and a list with one or more
5982 07 Jul 20 nicklas 11   scripts files that should be uploaded to the work folder.
5982 07 Jul 20 nicklas 12   
5982 07 Jul 20 nicklas 13   @author nicklas
5982 07 Jul 20 nicklas 14   @since 1.4
5982 07 Jul 20 nicklas 15 */
5982 07 Jul 20 nicklas 16 public class JobSubmission 
5982 07 Jul 20 nicklas 17 {
5982 07 Jul 20 nicklas 18
5982 07 Jul 20 nicklas 19   private String submitCmd;
5982 07 Jul 20 nicklas 20   private List<UploadSource> scripts;
5982 07 Jul 20 nicklas 21   
5982 07 Jul 20 nicklas 22   public JobSubmission()
5982 07 Jul 20 nicklas 23   {}
5982 07 Jul 20 nicklas 24   
5982 07 Jul 20 nicklas 25   public JobSubmission(String cmd, List<UploadSource> scripts)
5982 07 Jul 20 nicklas 26   {
5982 07 Jul 20 nicklas 27     this.submitCmd = cmd;
5982 07 Jul 20 nicklas 28     this.scripts = scripts;
5982 07 Jul 20 nicklas 29   }
5982 07 Jul 20 nicklas 30   
5982 07 Jul 20 nicklas 31   /**
5982 07 Jul 20 nicklas 32     The command that should be executed in order to register the job
5982 07 Jul 20 nicklas 33     with the cluster. The command must return a single value that is
5982 07 Jul 20 nicklas 34     a unique identifier for the job (eg. the JOB_ID)
5982 07 Jul 20 nicklas 35   */
5982 07 Jul 20 nicklas 36   public String getSubmitCmd()
5982 07 Jul 20 nicklas 37   {
5982 07 Jul 20 nicklas 38     return submitCmd;
5982 07 Jul 20 nicklas 39   }
5982 07 Jul 20 nicklas 40   
5982 07 Jul 20 nicklas 41   /**
5982 07 Jul 20 nicklas 42     List of files that should be uploaded to the work folder
5982 07 Jul 20 nicklas 43     that has been created for the job before the job is executed.
5982 07 Jul 20 nicklas 44   */
5982 07 Jul 20 nicklas 45   public List<UploadSource> getJobScripts()
5982 07 Jul 20 nicklas 46   {
5982 07 Jul 20 nicklas 47     return scripts;
5982 07 Jul 20 nicklas 48   }
5982 07 Jul 20 nicklas 49   
5982 07 Jul 20 nicklas 50 }