com.ace.moab.api.node
Class NodeSet

java.lang.Object
  extended by com.ace.moab.api.node.NodeSet
All Implemented Interfaces:
java.io.Serializable

public class NodeSet
extends java.lang.Object
implements java.io.Serializable

This class represents a node set collection that groups a set of resources together for use by a job or other object inside of Moab.

This is a feature that allows jobs to request sets of common resources without specifying exactly what resources are required.

Author:
Brady Kimball
See Also:
Serialized Form

Constructor Summary
NodeSet(ResourceSetSelection selection, ResourceSetType type)
          Initializes a new NodeSet instance.
NodeSet(ResourceSetSelection selection, ResourceSetType type, java.util.List<java.lang.String> resourceList)
           
 
Method Summary
 ResourceSetPriority getPriority()
           Returns the priority that allows control over how the best resource set is selected.
 java.util.List<java.lang.String> getResourceList()
           Returns the list of resources that relates to the type of set this is.
 ResourceSetSelection getSelection()
           Returns the selection type that defines what kind of node set to use.
 java.lang.Double getTolerance()
           Returns the specification of the percentage difference between the fastest and slowest node.
 ResourceSetType getType()
           Returns the type of set that the node set is.
static NodeSet parseString(java.lang.String string)
          Parses a string and converts it into a NodeSet object if possible.
 void setPriority(ResourceSetPriority priority)
           Sets the priority that allows control over how the best resource set is selected.
 void setResourceList(java.util.List<java.lang.String> resourceList)
           Sets the list of resources that relates to the type of set this is.
 void setSelection(ResourceSetSelection selection)
           Sets the selection type that defines what kind of node set to use.
 void setTolerance(java.lang.Double tolerance)
           Sets the specification of the percentage difference between the fastest and slowest node.
 void setType(ResourceSetType type)
           Set the type of set that the node set is.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeSet

public NodeSet(ResourceSetSelection selection,
               ResourceSetType type)
        throws InvalidMoabArgumentException
Initializes a new NodeSet instance. Neither parameter can be null.

Parameters:
selection - the selection type for the new node set.
type - the type of node set.
Throws:
InvalidMoabArgumentException - thrown if either parameter is null.

NodeSet

public NodeSet(ResourceSetSelection selection,
               ResourceSetType type,
               java.util.List<java.lang.String> resourceList)
        throws InvalidMoabArgumentException
Throws:
InvalidMoabArgumentException
Method Detail

getSelection

public ResourceSetSelection getSelection()

Returns the selection type that defines what kind of node set to use.

Cannot be null.

Returns:
the selection type that defines what kind of node set to use.

setSelection

public void setSelection(ResourceSetSelection selection)
                  throws InvalidMoabArgumentException

Sets the selection type that defines what kind of node set to use.

Cannot be null.

Parameters:
selection - the selection type that defines what kind of node set to use.
Throws:
InvalidMoabArgumentException - thrown if selection is null.

getType

public ResourceSetType getType()

Returns the type of set that the node set is.

Cannot be null.

Returns:
the type of set that the node set is.

setType

public void setType(ResourceSetType type)
             throws InvalidMoabArgumentException

Set the type of set that the node set is.

Cannot be null.

Parameters:
type - the type of set that the node set is.
Throws:
thrown - if type is null.
InvalidMoabArgumentException

getResourceList

public java.util.List<java.lang.String> getResourceList()

Returns the list of resources that relates to the type of set this is.

Can be null.

Returns:
the list of resources that relates to the type of set this is.

setResourceList

public void setResourceList(java.util.List<java.lang.String> resourceList)

Sets the list of resources that relates to the type of set this is.

Can be null.

Parameters:
resourceList - the list of resources that relates to the type of set this is.

getPriority

public ResourceSetPriority getPriority()

Returns the priority that allows control over how the best resource set is selected.

Can be null.

Returns:
the priority that allows control over how the best resource set is selected.

setPriority

public void setPriority(ResourceSetPriority priority)

Sets the priority that allows control over how the best resource set is selected.

Can be null.

Parameters:
priority - the priority that allows control over how the best resource set is selected.

getTolerance

public java.lang.Double getTolerance()

Returns the specification of the percentage difference between the fastest and slowest node.

Can be null.

Returns:
the specification of the percentage difference between the fastest and slowest node.

setTolerance

public void setTolerance(java.lang.Double tolerance)

Sets the specification of the percentage difference between the fastest and slowest node.

Can be null.

Parameters:
tolerance - the specification of the percentage difference between the fastest and slowest node.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

parseString

public static NodeSet parseString(java.lang.String string)
                           throws java.text.ParseException
Parses a string and converts it into a NodeSet object if possible.

Parameters:
string - the string to be parsed.
Returns:
the corresponding NodeSet enum value.
Throws:
java.text.ParseException - thrown if the String cannot be parsed.


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