extensions/net.sf.basedb.reggie/trunk/src/net/sf/basedb/reggie/grid/AbstractJobCreator.java

Code
Comments
Other
Rev Date Author Line
6674 11 Apr 22 nicklas 1 package net.sf.basedb.reggie.grid;
6674 11 Apr 22 nicklas 2
6674 11 Apr 22 nicklas 3 import net.sf.basedb.opengrid.config.BatchConfig;
6674 11 Apr 22 nicklas 4
6674 11 Apr 22 nicklas 5 /**
6674 11 Apr 22 nicklas 6   An abstract base class for job creator implementations that
6674 11 Apr 22 nicklas 7   is implementing a few common options and configuration settings.
6674 11 Apr 22 nicklas 8   @since 4.38
6674 11 Apr 22 nicklas 9 */
6674 11 Apr 22 nicklas 10 public abstract class AbstractJobCreator 
6674 11 Apr 22 nicklas 11 {
6674 11 Apr 22 nicklas 12   
6674 11 Apr 22 nicklas 13   protected boolean debug;
6674 11 Apr 22 nicklas 14   protected Integer priority;
6979 16 Jan 23 nicklas 15   protected String partition;
7372 06 Oct 23 nicklas 16   protected String submitOptionsOverride;
6674 11 Apr 22 nicklas 17   protected boolean autoConfirm;
6674 11 Apr 22 nicklas 18   protected BatchConfig batchConfig;
6674 11 Apr 22 nicklas 19
6674 11 Apr 22 nicklas 20   protected AbstractJobCreator()
6674 11 Apr 22 nicklas 21   {}
6674 11 Apr 22 nicklas 22   
6674 11 Apr 22 nicklas 23   /**
6674 11 Apr 22 nicklas 24     If this flag is set, the job is automatically confirmed and
6674 11 Apr 22 nicklas 25     scheduled for the next step if certain rules are met.
6674 11 Apr 22 nicklas 26   */
6674 11 Apr 22 nicklas 27   public void setAutoConfirm(boolean autoConfirm)
6674 11 Apr 22 nicklas 28   {
6674 11 Apr 22 nicklas 29     this.autoConfirm = autoConfirm;
6674 11 Apr 22 nicklas 30   }
6674 11 Apr 22 nicklas 31   
6674 11 Apr 22 nicklas 32   
6674 11 Apr 22 nicklas 33   /**
6674 11 Apr 22 nicklas 34     If the debug flag is set, the job is created in debug mode, which means
6674 11 Apr 22 nicklas 35     that some temporary files are not removed, and only chr1 is used if the
6674 11 Apr 22 nicklas 36     number of aligned pairs is bigger than the 'cufflinks/debug-max-aligned'
6674 11 Apr 22 nicklas 37     setting.
6674 11 Apr 22 nicklas 38   */
6674 11 Apr 22 nicklas 39   public void setDebug(boolean debug)
6674 11 Apr 22 nicklas 40   {
6674 11 Apr 22 nicklas 41     this.debug = debug;
6674 11 Apr 22 nicklas 42   }
6674 11 Apr 22 nicklas 43   
6674 11 Apr 22 nicklas 44   /**
6674 11 Apr 22 nicklas 45     Set the priority value for the job on the cluster. If set to null, 
6674 11 Apr 22 nicklas 46     the job is submitted with default priority.
6674 11 Apr 22 nicklas 47   */
6674 11 Apr 22 nicklas 48   public void setPriority(Integer priority)
6674 11 Apr 22 nicklas 49   {
6674 11 Apr 22 nicklas 50     this.priority = priority;
6674 11 Apr 22 nicklas 51   }
6979 16 Jan 23 nicklas 52   
6979 16 Jan 23 nicklas 53   /**
6979 16 Jan 23 nicklas 54     Set the partition (=queue) for the job on the cluster. If set to null,
6979 16 Jan 23 nicklas 55     the job is submitted to the default partition.
6979 16 Jan 23 nicklas 56     @since 4.42
6979 16 Jan 23 nicklas 57   */
6979 16 Jan 23 nicklas 58   public void setPartition(String partition)
6979 16 Jan 23 nicklas 59   {
6979 16 Jan 23 nicklas 60     this.partition = partition;
6979 16 Jan 23 nicklas 61   }
7372 06 Oct 23 nicklas 62   
7372 06 Oct 23 nicklas 63   /**
7372 06 Oct 23 nicklas 64     Manually set options that override the <submit> options from 
7372 06 Oct 23 nicklas 65     the reggie-config.xml file.
7372 06 Oct 23 nicklas 66     @since 4.49.3
7372 06 Oct 23 nicklas 67   */
7372 06 Oct 23 nicklas 68   public void setSubmitOptionsOverride(String submitOptions)
7372 06 Oct 23 nicklas 69   {
7372 06 Oct 23 nicklas 70     this.submitOptionsOverride = submitOptions;
7372 06 Oct 23 nicklas 71   }
6674 11 Apr 22 nicklas 72
6674 11 Apr 22 nicklas 73   public void setBatchConfig(BatchConfig batchConfig)
6674 11 Apr 22 nicklas 74   {
6674 11 Apr 22 nicklas 75     this.batchConfig = batchConfig;
6674 11 Apr 22 nicklas 76   }
6979 16 Jan 23 nicklas 77
6674 11 Apr 22 nicklas 78 }