com.ace.moab.api.jobs
Enum DependencyType

java.lang.Object
  extended by java.lang.Enum<DependencyType>
      extended by com.ace.moab.api.jobs.DependencyType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DependencyType>

public enum DependencyType
extends java.lang.Enum<DependencyType>

Represents the type of dependencies that can exist on a job in Moab.

What can potentially be confusing is that Moab can have multiple different names for each dependency type, one for job submission/modification commands and one Moab returns when doing job queries. The actual name of the enum is the one Moab returns when doing job queries. The commandName is the name which must be used when sending submit/modification requests to Moab. Finally the human readable name is the one displayed in windows and forms.

Author:
Scott Brown, additional comments added by Nate Seeley

Enum Constant Summary
BEFORE
          Job may start at any time before specified jobs have started execution.
BEFOREANY
          Job may start at any time before all specified jobs have completed regardless of completion status.
BEFORENOTOK
          Job may start at any time before any specified jobs have completed unsuccessfully.
BEFOREOK
          Job may start at any time before all specified jobs have successfully completed.
HIBERNATE
          Job was set to Hibernate mode.
JOBCOMPLETE
          Job may start at any time after all specified jobs have completed regardless of completion status.
JOBFAILEDCOMPLETE
          Job may start at any time after any specified jobs have completed unsuccessfully.
JOBSTART
          Job may start at any time after specified jobs have started execution.
JOBSUCCESSFULCOMPLETE
          Job may be start at any time after all specified jobs have successfully completed.
SYNCCOUNT
          This job will wait until it can start simultaneously with synccount jobs of type syncwith that have all specified this synccount job is their master job.
SYNCWITH
          Job will wait until it can start simultaneously with a master job
 
Method Summary
 java.lang.String getCommandName()
          Get a string representation of the command name.
 java.lang.String getHumanName()
          Get a string representation of the human-readable dependency name
static java.util.Vector<java.lang.String> getMoabNames()
           Get a list of dependency types that Moab recognizes.
static DependencyType parse(java.lang.Object object)
          Parses a string and converts it into a DependencyType enum value if possible.
static DependencyType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DependencyType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

JOBSTART

public static final DependencyType JOBSTART
Job may start at any time after specified jobs have started execution.


JOBSUCCESSFULCOMPLETE

public static final DependencyType JOBSUCCESSFULCOMPLETE
Job may be start at any time after all specified jobs have successfully completed.


JOBFAILEDCOMPLETE

public static final DependencyType JOBFAILEDCOMPLETE
Job may start at any time after any specified jobs have completed unsuccessfully.


JOBCOMPLETE

public static final DependencyType JOBCOMPLETE
Job may start at any time after all specified jobs have completed regardless of completion status.


BEFORE

public static final DependencyType BEFORE
Job may start at any time before specified jobs have started execution. NOTE: Only reported to Moab and then reported back. Moab currently cannot internally handle this type of dependency.


BEFOREANY

public static final DependencyType BEFOREANY
Job may start at any time before all specified jobs have completed regardless of completion status. NOTE: Only reported to Moab and then reported back. Moab currently cannot internally handle this type of dependency.


BEFOREOK

public static final DependencyType BEFOREOK
Job may start at any time before all specified jobs have successfully completed. NOTE: Only reported to Moab and then reported back. Moab currently cannot internally handle this type of dependency.


BEFORENOTOK

public static final DependencyType BEFORENOTOK
Job may start at any time before any specified jobs have completed unsuccessfully. NOTE: Only reported to Moab and then reported back. Moab currently cannot internally handle this type of dependency.


HIBERNATE

public static final DependencyType HIBERNATE
Job was set to Hibernate mode.


SYNCWITH

public static final DependencyType SYNCWITH
Job will wait until it can start simultaneously with a master job


SYNCCOUNT

public static final DependencyType SYNCCOUNT
This job will wait until it can start simultaneously with synccount jobs of type syncwith that have all specified this synccount job is their master job.

Method Detail

values

public static final DependencyType[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(DependencyType c : DependencyType.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static DependencyType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

parse

public static DependencyType parse(java.lang.Object object)
                            throws java.text.ParseException
Parses a string and converts it into a DependencyType enum value if possible. Uses either Moab or command style dependency names.

Parameters:
object - the object to be parsed.
Returns:
the corresponding DependencyType enum value.
Throws:
java.lang.IllegalArgumentException - if the String cannot be parsed.
java.text.ParseException

getMoabNames

public static java.util.Vector<java.lang.String> getMoabNames()

Get a list of dependency types that Moab recognizes. These dependencies are NOT resource manager specific, and Moab should be able to handle these dependencies internally.

Returns:
a list of dependency types that Moab recognizes.

getCommandName

public java.lang.String getCommandName()
Get a string representation of the command name. This is the name associated with this dependency used in making job submit and modification requests. Note that this is not necessarily the name Moab will return in the output of a job query - that name is the actual enum name.

Returns:
the command name.

getHumanName

public java.lang.String getHumanName()
Get a string representation of the human-readable dependency name

Returns:
the human-readable dependency name


Copyright © 2001-2009 Cluster Resources, Inc. All Rights Reserved.