com.ace.moab.api.query
Class JobQuery

java.lang.Object
  extended by com.ace.moab.api.query.JobQuery

public class JobQuery
extends java.lang.Object

Class used for querying the Moab Workload Manager for job information.

Author:
Scott Brown

Constructor Summary
JobQuery()
           
 
Method Summary
static Jobs getActiveJobs(IMoabConnection moabConnection)
          Return a list of all the jobs currently active (not completed) according to Moab.
static Jobs getCompletedJobs(IMoabConnection moabConnection)
          Returns all completed jobs still left in Moab's completed job buffer.
static JobsSummary getCompleteJobSummary(IMoabConnection moabConnection)
          Get the job summary information for all users from Moab.
static MoabJob getSpecificJob(IMoabConnection moabConnection, java.lang.String jobID, boolean isCompleted)
          Get a specific job from Moab.
static JobsSummary getUserJobSummary(IMoabConnection moabConnection, java.lang.String username)
          Get the job summary information for the given user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JobQuery

public JobQuery()
Method Detail

getActiveJobs

public static Jobs getActiveJobs(IMoabConnection moabConnection)
                          throws MoabCommunicationException
Return a list of all the jobs currently active (not completed) according to Moab.

Parameters:
moabConnection - The connection used to run the commands
Returns:
a list of all the jobs currently active (not completed) according to Moab.
Throws:
MoabCommunicationException - Thrown if communication with Moab fails or the XML is invalid.

getCompletedJobs

public static Jobs getCompletedJobs(IMoabConnection moabConnection)
                             throws MoabCommunicationException
Returns all completed jobs still left in Moab's completed job buffer.

Parameters:
moabConnection - the connection to use to get the completed jobs information.
Returns:
all completed jobs still left in Moab's completed job buffer.
Throws:
MoabCommunicationException - Thrown if communication with Moab fails or the XML is invalid.

getCompleteJobSummary

public static JobsSummary getCompleteJobSummary(IMoabConnection moabConnection)
                                         throws MoabCommunicationException
Get the job summary information for all users from Moab.

Parameters:
moabConnection - The connection to use to get the job information.
Returns:
the job summary information for all users from Moab.
Throws:
MoabCommunicationException - Thrown if communication with Moab fails or the XML is invalid.

getSpecificJob

public static MoabJob getSpecificJob(IMoabConnection moabConnection,
                                     java.lang.String jobID,
                                     boolean isCompleted)
                              throws MoabCommunicationException
Get a specific job from Moab. If the job is not found, null is returned.

Parameters:
moabConnection - The connection to use to connect to Moab.
jobID - The unique job identifier according to Moab.
isCompleted - If true, the query will be setup to look for completed jobs with the jobID given, otherwise Moab will look at active (not completed) jobs only
Returns:
The MoabJob with the associated jobID
Throws:
MoabCommunicationException - Thrown if communication with Moab fails or the XML is invalid.

getUserJobSummary

public static JobsSummary getUserJobSummary(IMoabConnection moabConnection,
                                            java.lang.String username)
                                     throws MoabCommunicationException
Get the job summary information for the given user. If the username is empty, gets the job summary information for all users.

Parameters:
username - The name of the user The connection to use to get the job information.
Returns:
the job summary information for the given user.
Throws:
MoabCommunicationException - Thrown if communication with Moab fails or the XML is invalid.


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