com.ace.moab.api.query
Class NodeQuery

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

public class NodeQuery
extends java.lang.Object

Class used for querying the Moab Workload Manager for node or server information.

Author:
Scott Brown

Constructor Summary
NodeQuery()
           
 
Method Summary
static Nodes getAllNodes(IMoabConnection moabConnection)
          Get all the nodes according to Moab.
static MoabNode getNodeDefaults(IMoabConnection moabConnection)
          Get the node defaults and package them into a MoabNode object.
static NodesSummary getNodeSummary(IMoabConnection moabConnection, java.lang.String userName)
          Returns a node summary either for all nodes or just the nodes accessible by a specified user.
static MoabNode getSpecificNode(IMoabConnection moabConnection, java.lang.String nodeID)
          Gets a specific node using the node's ID.
static Nodes getSpecificPartitionNodes(IMoabConnection moabConnection, java.lang.String partition)
          Get the nodes for the partition/cluster name passed but does not put them in the global cache.
static Nodes getUserSpecificNodes(IMoabConnection moabConnection, java.lang.String username)
          Get all the nodes the given user has access to according to Moab.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeQuery

public NodeQuery()
Method Detail

getAllNodes

public static Nodes getAllNodes(IMoabConnection moabConnection)
                         throws MoabCommunicationException
Get all the nodes according to Moab.

Parameters:
moabConnection - The IMoabConneciton used to connect to Moab.
Returns:
The nodes that are saved in the cache.
Throws:
MoabCommunicationException - thrown if communication with Moab has problems or Moab's XML in malformed.

getUserSpecificNodes

public static Nodes getUserSpecificNodes(IMoabConnection moabConnection,
                                         java.lang.String username)
                                  throws MoabCommunicationException
Get all the nodes the given user has access to according to Moab.

Parameters:
moabConnection - The IMoabConneciton used to connect to Moab.
username - The name of the user to get nodes for.
Returns:
The nodes that are saved in the cache.
Throws:
MoabCommunicationException - thrown if communication with Moab has problems or Moab's XML in malformed.

getSpecificNode

public static MoabNode getSpecificNode(IMoabConnection moabConnection,
                                       java.lang.String nodeID)
                                throws MoabCommunicationException
Gets a specific node using the node's ID. Returns null if node cannot be found.

Parameters:
moabConnection - The IMoabConneciton used to connect to Moab.
nodeID - the ID of the MoabStatsNode object requested.
Returns:
the MoabNode object corresponding to the requested ID.
Throws:
MoabCommunicationException - thrown if the communication to Moab has problems or Moab's XML is malformed.

getNodeDefaults

public static MoabNode getNodeDefaults(IMoabConnection moabConnection)
                                throws MoabCommunicationException
Get the node defaults and package them into a MoabNode object.

Parameters:
moabConnection - The IMoabConneciton used to connect to Moab.
Returns:
the node defaults packaged into a MoabNode object.
Throws:
MoabCommunicationException - thrown if the communication to Moab has problems or Moab's XML is malformed.

getNodeSummary

public static NodesSummary getNodeSummary(IMoabConnection moabConnection,
                                          java.lang.String userName)
                                   throws MoabCommunicationException
Returns a node summary either for all nodes or just the nodes accessible by a specified user.

Parameters:
moabConnection - The IMoabConneciton used to connect to Moab.
userName - the optional user name to specify to get the node summary for. If null, all nodes will be reported.
Returns:
the nodes summary including what is active, idle, and so on.
Throws:
MoabCommunicationException - thrown if communication with Moab has problems or the XML is malformed.

getSpecificPartitionNodes

public static Nodes getSpecificPartitionNodes(IMoabConnection moabConnection,
                                              java.lang.String partition)
                                       throws MoabCommunicationException
Get the nodes for the partition/cluster name passed but does not put them in the global cache.

Parameters:
moabConnection - The IMoabConneciton used to connect to Moab.
partition - The name of the partition to get the nodes for.
Throws:
MoabCommunicationException


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