com.ace.moab.api.jobs
Class JobAllocatedNode

java.lang.Object
  extended by com.ace.moab.api.jobs.JobAllocatedNode
All Implemented Interfaces:
java.lang.Comparable<JobAllocatedNode>

public class JobAllocatedNode
extends java.lang.Object
implements java.lang.Comparable<JobAllocatedNode>

This class represents the bare essentials of a node allocated to a job. This information includes the node ID and the task count for that node.

Since:
5.3.2
Author:
Brady Kimball

Constructor Summary
JobAllocatedNode(java.lang.String nodeID)
          Initializes the new JobAllocatedNode.
JobAllocatedNode(java.lang.String nodeID, int taskCount)
          Initializes the new JobAllocatedNode.
 
Method Summary
 int compareTo(JobAllocatedNode o)
           
 boolean equals(java.lang.Object obj)
           
 java.lang.String getNodeID()
          Returns the unique identifier of the node allocated.
 int getTaskCount()
          Returns the number of tasks used on the allocated node.
 int hashCode()
           
 void setNodeID(java.lang.String nodeID)
          Sets the unique identifier of the node allocated.
 void setTaskCount(int taskCount)
          Sets the number of tasks used on the allocated node.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobAllocatedNode

public JobAllocatedNode(java.lang.String nodeID)
                 throws InvalidMoabArgumentException
Initializes the new JobAllocatedNode.

Parameters:
nodeID - the unique identifier of the node. Cannot be null.
Throws:
InvalidMoabArgumentException - thrown if nodeID is null.

JobAllocatedNode

public JobAllocatedNode(java.lang.String nodeID,
                        int taskCount)
                 throws InvalidMoabArgumentException
Initializes the new JobAllocatedNode.

Parameters:
nodeID - the unique identifier of the node. Cannot be null.
taskCount - the number of tasks allocated from the node.
Throws:
InvalidMoabArgumentException - thrown if nodeID is null.
Method Detail

getNodeID

public java.lang.String getNodeID()
Returns the unique identifier of the node allocated.

Returns:
the unique identifier of the node allocated.

getTaskCount

public int getTaskCount()
Returns the number of tasks used on the allocated node.

Returns:
the number of tasks used on the allocated node.

setNodeID

public void setNodeID(java.lang.String nodeID)
               throws InvalidMoabArgumentException
Sets the unique identifier of the node allocated. Cannot be null.

Parameters:
nodeID - the unique identifier of the node allocated.
Throws:
InvalidMoabArgumentException - thrown if nodeID is null.

setTaskCount

public void setTaskCount(int taskCount)
                  throws InvalidMoabArgumentException
Sets the number of tasks used on the allocated node. Cannot be less than 1.

Parameters:
taskCount - the number of tasks used on the allocated node.
Throws:
InvalidMoabArgumentException - thrown if taskCount is less than 1.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(JobAllocatedNode o)
Specified by:
compareTo in interface java.lang.Comparable<JobAllocatedNode>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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