com.ace.moab.api.query
Class ReservationQuery

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

public class ReservationQuery
extends java.lang.Object

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

Author:
Scott Brown

Constructor Summary
ReservationQuery()
           
 
Method Summary
static Reservations getAllReservations(IMoabConnection moabConnection)
           Queries moab for all of the reservations in the system.
static Reservation getReservationByName(IMoabConnection moabConnection, java.lang.String rsvName)
          Returns a Reservation object corresponding to the requested Reservation ID.
static java.util.Vector<StandingReservation> getStandingReservations(IMoabConnection moabConnection)
          Returns a list of all standing reservations in Moab.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReservationQuery

public ReservationQuery()
Method Detail

getReservationByName

public static Reservation getReservationByName(IMoabConnection moabConnection,
                                               java.lang.String rsvName)
                                        throws MoabCommunicationException,
                                               com.moab.api.connect.exception.RequestException
Returns a Reservation object corresponding to the requested Reservation ID.

Parameters:
moabConnection - the connection to Moab to get a specific reservation. Cannot be null.
rsvName - the name of the reservation to get.
Returns:
the corresponding Reservation object relating to the rsvName.
Throws:
MoabCommunicationException - thrown if communication with Moab fails or Moab XML fails.
com.moab.api.connect.exception.RequestException - thrown if no Reservation is found corresponding to the rsvName.

getAllReservations

public static Reservations getAllReservations(IMoabConnection moabConnection)
                                       throws MoabCommunicationException

Queries moab for all of the reservations in the system.

All reservations include user and job reservations.

Parameters:
moabConnection - the connection to Moab that has the reservations.
Returns:
all job and user reservations in the system.
Throws:
MoabCommunicationException - thrown if the connection to Moab has problems or XML parsing

getStandingReservations

public static java.util.Vector<StandingReservation> getStandingReservations(IMoabConnection moabConnection)
Returns a list of all standing reservations in Moab.

Parameters:
moabConnection - The connection used to connect and run commands on Moab.
Returns:
a list of all standing reservations in Moab.


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