com.ace.moab.api.jobs
Class GenericResource

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

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

This object represents a moab generic resource. For each resource, there are three parts: The Resorce Type, the Resource Quantity, and the Consumption Timeframe (the last part is optional) For more information: http://www.clusterresources.com/products/mwm/docs/13.3rmextensions.shtml#gres

Author:
jmecham

Constructor Summary
GenericResource()
           
GenericResource(java.lang.String type, int quantity, int timeframe)
          Generic Resources constructors
 
Method Summary
 int compareTo(GenericResource genericResource)
           
 boolean equals(java.lang.Object other)
          
 int getQuantity()
           
 int getTimeframe()
           
 java.lang.String getType()
           
 void setQuantity(int quantity)
           
 void setTimeframe(int timeframe)
           
 void setType(java.lang.String type)
           
 java.lang.String toCommand()
          Return a moab-readable string representation of the this dependency
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GenericResource

public GenericResource()

GenericResource

public GenericResource(java.lang.String type,
                       int quantity,
                       int timeframe)
Generic Resources constructors

Parameters:
type -
quantity -
timeframe -
Method Detail

toString

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

toCommand

public java.lang.String toCommand()
Return a moab-readable string representation of the this dependency

Returns:
moab-readable string representation of the this dependency

compareTo

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

getType

public java.lang.String getType()
Returns:
the type

setType

public void setType(java.lang.String type)
Parameters:
type - the type to set

getQuantity

public int getQuantity()
Returns:
the quantity

setQuantity

public void setQuantity(int quantity)
Parameters:
quantity - the quantity to set

getTimeframe

public int getTimeframe()
Returns:
the timeframe

setTimeframe

public void setTimeframe(int timeframe)
Parameters:
timeframe - the timeframe to set

equals

public boolean equals(java.lang.Object other)

Overrides:
equals in class java.lang.Object


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