com.ace.moab.api.resourceset
Enum ResourceSetPriority

java.lang.Object
  extended by java.lang.Enum<ResourceSetPriority>
      extended by com.ace.moab.api.resourceset.ResourceSetPriority
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ResourceSetPriority>

public enum ResourceSetPriority
extends java.lang.Enum<ResourceSetPriority>

This enumeration represents the priority to give a resource set. Resources can be grouped together in a set for use by jobs or any other Moab objects.

When resources are available in more than one resource set, this parameter allows control over how the best resource set is selected.

Author:
Brady Kimball
See Also:
JobRequirement

Enum Constant Summary
BESTFIT
           Select the smallest resource set possible.
BESTRESOURCE
           Select the resource with the best nodes.
MINLOSS
          Select the resource set that results in the minimal wasted resources assuming no internal job load balancing is available.
WORSTFIT
           Select the largest resource set possible.
 
Method Summary
static ResourceSetPriority parseString(java.lang.String string)
          Parses a string and converts it into a ResourceSetPriority enum value if possible.
 java.lang.String toString()
           
static ResourceSetPriority valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ResourceSetPriority[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BESTFIT

public static final ResourceSetPriority BESTFIT

Select the smallest resource set possible.

Minimizes fragmentation of larger resource sets.


WORSTFIT

public static final ResourceSetPriority WORSTFIT

Select the largest resource set possible.

Minimizes creation of small resource fragment, but fragments larger resource sets.


BESTRESOURCE

public static final ResourceSetPriority BESTRESOURCE

Select the resource with the best nodes.

Best nodes are defined as nodes with the highest proc speed. The Moab parameter NODESETATTRIBUTE must be set to PROCSPEED for this to be taken into account.


MINLOSS

public static final ResourceSetPriority MINLOSS
Select the resource set that results in the minimal wasted resources assuming no internal job load balancing is available. (Assumes parallel jobs only run as fast as the slowest allocated node.)

Min. loss uses nodes with the highest proc speed. The Moab parameter NODESETATTRIBUTE must be set to PROCSPEED for this to be taken into account.

Method Detail

values

public static final ResourceSetPriority[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(ResourceSetPriority c : ResourceSetPriority.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static ResourceSetPriority valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<ResourceSetPriority>

parseString

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

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


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