|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ace.moab.api.jobs.Jobs
public class Jobs
This class represents a collection of Jobs found in Moab. This groups multiple jobs into one object to allow group wide operations to be done on Jobs such as adding and deleting and searching for jobs.
Constructor Summary | |
---|---|
Jobs()
Initializes an empty collection of jobs. |
|
Jobs(java.util.Collection<MoabJob> jobs)
Initialize the collection of jobs based on the collection of jobs given. |
Method Summary | |
---|---|
void |
addJob(MoabJob job)
Adds a job to the collection. |
MoabJob |
findJob(java.lang.String jobName)
Attempts to find a job with the respective job name. |
boolean |
hasDynamicJobs()
Determines if any dynamic jobs exist in the collection |
boolean |
hasRunningJobs()
Determines if at least one job exists in the collection that currently running on one or more nodes. |
boolean |
isEmpty()
Returns true if no jobs are in the collection. |
java.util.Iterator<MoabJob> |
iterator()
|
void |
removeJob(MoabJob job)
Attempts to remove a job from the collection. |
void |
removeJob(java.lang.String jobName)
Attempts to remove a job from the collection. |
java.util.List<MoabJob> |
toList()
Converts the collection of jobs into a list of job objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Jobs()
public Jobs(java.util.Collection<MoabJob> jobs)
null
, an empty collection is
initialized.
jobs
- the jobs to store in the collection.Method Detail |
---|
public void addJob(MoabJob job)
job
- the job to be added.public MoabJob findJob(java.lang.String jobName)
null
, null
is returned. Similarly, if the
job cannot be found, null
is returned.
jobName
- the name of the job to search for.
public void removeJob(MoabJob job)
job
- the job to be removed.public void removeJob(java.lang.String jobName)
jobName
- the name of the job to be removed.public java.util.List<MoabJob> toList()
public boolean hasDynamicJobs()
public java.util.Iterator<MoabJob> iterator()
iterator
in interface java.lang.Iterable<MoabJob>
public boolean hasRunningJobs()
public boolean isEmpty()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |