com.ace.moab.api.jobs
Class StandardJobDependency

java.lang.Object
  extended by com.ace.moab.api.jobs.JobDependency
      extended by com.ace.moab.api.jobs.StandardJobDependency
Direct Known Subclasses:
BeforeAnyDependency, BeforeDependency, BeforeNotOKDependency, BeforeOKDependency, HibernateDependency, JobCompleteDependency, JobFailedCompleteDependency, JobStartDependency, JobSuccessfulCompleteDependency

public abstract class StandardJobDependency
extends JobDependency

This object represents a standard moab Job Dependency. For each dependency, there are two basic parts: the depend type and the jobs that are checked.

The depend type is one of the common TORQUE-style dependency types, such as 'afterok' but does not include 'syncwith' or 'synccount'

The jobs object is a vector that represents all the jobs that are dependent on the given dependency type. For example, let's assume we have jobs A, B, C, and D running on a given system. To submit a new job, we could add a JobDependency object that has a DependencyType of "after" and the jobs object can contain jobIDs A and B. The newly submitted job (we'll call it E) cannot run till jobs A and B have started execution. Remember that any job can have any number of Job Dependencies.

Author:
Scott Brown, Nate Seeley

Constructor Summary
protected StandardJobDependency(DependencyType type, java.util.Set<java.lang.String> jobs)
          Constructor for this class
protected StandardJobDependency(DependencyType type, java.lang.String job)
          Constructor for this class
 
Method Summary
 boolean equals(java.lang.Object other)
          
 java.util.Set<java.lang.String> getJobs()
          Get the jobs that this object is dependent on.
 java.lang.String toCommand()
          Return a moab-readable string representation of the this dependency to be used when submitting jobs
 java.lang.String toString()
          
 
Methods inherited from class com.ace.moab.api.jobs.JobDependency
getType
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StandardJobDependency

protected StandardJobDependency(DependencyType type,
                                java.util.Set<java.lang.String> jobs)
Constructor for this class

Parameters:
type - the type of job dependency.
jobs - the set of jobs the job with this dependency is dependent upon

StandardJobDependency

protected StandardJobDependency(DependencyType type,
                                java.lang.String job)
Constructor for this class

Parameters:
type - the type of job dependency.
job - the job this dependency is dependent upon
Method Detail

getJobs

public java.util.Set<java.lang.String> getJobs()
Get the jobs that this object is dependent on.

Returns:
the jobs

toCommand

public java.lang.String toCommand()
Description copied from class: JobDependency
Return a moab-readable string representation of the this dependency to be used when submitting jobs

Specified by:
toCommand in class JobDependency
Returns:
moab-readable string representation of the this dependency

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)

Overrides:
equals in class java.lang.Object


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