|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ace.moab.api.reservation.Reservation
public class Reservation
Class that represents a Reservation in Moab. This object can be used by MCM in either to create a reservation, or read in reservation details from moab.
There is no specific list of which properties can be set to null and which attributes must be specified; therefore the programmer must assume that all attributes may be null. The programmer should refer from the situation which variables should and should not be null. For example, when parsing XML from Moab about a reservation, the reservation will always have a name; but when a reservation is being created, the user does not have to specify a name.
Constructor Summary | |
---|---|
Reservation()
|
Method Summary | |
---|---|
void |
addAclObject(ACLRule aclObject)
Add an acl object to the appropriate ACL list |
void |
addVariable(Variable var)
Adds the variable to the set of variables defined in this reservation. |
java.lang.String |
allocatedNodesToString()
Creates a human-readable form of the allocatedNodes variable |
boolean |
containsAllocatedNode(MoabNode node)
Searches for the given node. |
java.lang.String |
getAccountingAccount()
Get the accountable account for the reservation. |
java.lang.String |
getAccountingClass()
Get the accountable class for the reservation. |
java.lang.String |
getAccountingGroup()
Get the accountable group for the reservation. |
java.lang.String |
getAccountingQOS()
Get the accountable QOS for the reservation. |
java.lang.String |
getAccountingUser()
Get the accountable user for the reservation. |
ACL |
getACL()
Get the complete list of ACL Objects including users, groups, accounts, classes, and qoses. |
java.lang.String |
getACLString()
Generates a String representation of the ACL for the reservation. |
java.util.Set<MoabNode> |
getAllocatedNodes()
Get a Set of type MoabNode that contains all nodes that are currently allocated to the reservation |
int |
getAllocNodeCount()
Get the total number of allocated nodes for the reservation |
int |
getAllocProcCount()
Get the total number of allocated processors for the reservation |
int |
getAllocTaskCount()
Get the total number of allocated tasks for the reservation |
java.lang.String |
getComments()
Get the comments that users might have added to the reservation. |
java.util.Date |
getCreationDate()
Get the creation date from Moab. |
java.lang.String |
getCredentials()
Get credential access defined by Moab. |
long |
getDuration()
Get the duration of this reservation in seconds. |
java.util.Date |
getEndDate()
Get the end date of the reservation. |
long |
getEndTimeInSeconds()
Returns the end time of the reservation in epoch time seconds. |
java.util.Date |
getExpireDate()
Get the reservation's expiration date |
ReservationFlags |
getFlags()
Get the reservation flags associated to this reservation |
java.lang.String |
getFormattedEndTime()
Returns a formatted String representing the end time of the reservation. |
java.lang.String |
getFormattedStartTime()
Returns a formatted String representing the start time of the reservation. |
java.lang.String |
getGlobalID()
Get the globalID as defined in Moab |
java.lang.String |
getHostListExpression()
Get the user-specified host list expression. |
JobReservation |
getJobInformation()
Get the job information for this reservation. |
int |
getMaxTasks()
Get the max number of tasks that can be assigned for the reservation. |
java.lang.String |
getMessages()
Get messages added to the reservation |
java.lang.String |
getName()
Get the reservation name |
NodeSetPolicy |
getNodeSetPolicy()
Get the node set policy for the reservation. |
java.lang.String |
getOwner()
Get the reservation's owner's name |
com.moab.api.partitions.Partition |
getPartition()
Get the partition that the reservation is running on or assigned to |
java.lang.String |
getProfile()
Get the profile that this reservation is (or will be) using. |
ReservationRequirements |
getRequirements()
Get the requirements that this reservation needs in order to be fulfilled. |
java.lang.String |
getResources()
Get the resources assigned or required for the reservation to be fulfilled |
java.lang.String |
getSpecName()
Get The specifed name for this reservation. |
java.util.Date |
getStartDate()
Get the start date of the reservation. |
long |
getStartTimeInSeconds()
Returns the start time of the reservation in epoch time seconds. |
ReservationStatistics |
getStatistics()
Get reservation's statistical information that Moab reports to MCM |
java.lang.String |
getSubType()
Get the reservation sub-type. |
int |
getTaskCount()
Get the number of tasks currently allocated for the reservation |
java.util.Set<Trigger> |
getTriggerList()
Get the list of triggers attached to the reservation. |
ReservationType |
getType()
Get the type of reservation. |
java.lang.String |
getUIndex()
Get the globally unique reservation index |
java.util.Set<Variable> |
getVariables()
Get the list of variables associated to the reservation. |
boolean |
isActive()
Returns true if the reservation is currently active |
boolean |
isTracked()
Returns true if reservation is being tracked by Moab |
void |
setAccountingAccount(java.lang.String accountingAccount)
Set the accountable account for the reservation. |
void |
setAccountingClass(java.lang.String accountingClass)
Set the accountable class for the reservation. |
void |
setAccountingGroup(java.lang.String accountingGroup)
Set the accountable group for the reservation. |
void |
setAccountingQOS(java.lang.String accountingQOS)
Set the accountable QOS for the reservation. |
void |
setAccountingUser(java.lang.String accountingUser)
Set the accountable user for the reservation. |
void |
setACL(ACL acl)
Set the complete list of ACL Objects including users, groups, accounts, classes, and qoses. |
void |
setActive(boolean isActive)
State if reservation is currently active |
void |
setAllocatedNodeList(java.lang.String nodeStr)
Set allocated node list from a comma delimited string |
void |
setAllocatedNodes(java.util.Set<MoabNode> allocatedNodes)
Set the list of MoabNodes that contains all nodes that are currently allocated to the reservation |
void |
setAllocNodeCount(int allocNodeCount)
Set the number of allocated nodes for the reservation |
void |
setAllocProcCount(int allocProcCount)
Set the number of allocated processors for the reservation |
void |
setAllocTaskCount(int allocTaskCount)
Set the number of allocated tasks for the reservation |
void |
setComments(java.lang.String comments)
Set the reservation's comments |
void |
setCreationDate(java.util.Date creationDate)
Set the reservation's creation date |
void |
setCredentials(java.lang.String credentials)
Set the credentials for the reservation |
void |
setDuration(long duration)
Set the duration of this reservation in seconds. |
void |
setEndDate(java.util.Date endDate)
Set the end date of the reservation. |
void |
setExpireDate(java.util.Date expireDate)
Set the reservation's expiration date |
void |
setFlags(ReservationFlags flags)
Set the reservation flags associated to this reservation |
void |
setGlobalID(java.lang.String globalID)
Set the globalID as defined in Moab |
void |
setHostListExpression(java.util.List<java.lang.String> nodeNames)
Set the user-specified host list expression. |
void |
setHostListExpression(java.lang.String hostListExpression)
Set the user-specified host list expression. |
void |
setJobInformation(JobReservation jobInformation)
Set the job information for this reservation. |
void |
setMaxTasks(int maxTasks)
Set the max number of tasks that can be assigned for the reservation. |
void |
setMessages(java.lang.String messages)
Set messages added to the reservation |
void |
setName(java.lang.String name)
Set the reservation name |
void |
setNodeSetPolicy(NodeSetPolicy nodeSetPolicy)
Sets the node set policy for this reservation |
void |
setOwner(java.lang.String owner)
Set the reservation's owner's name |
void |
setPartition(com.moab.api.partitions.Partition partition)
Set the partition that the reservation is running on or assigned to |
void |
setProfile(java.lang.String profile)
Set the profile that this reservation is (or will be) using. |
void |
setRequirements(ReservationRequirements requirements)
Set the requirements that this reservation needs in order to be fulfilled |
void |
setResources(java.lang.String resources)
Set the resources assigned or required for the reservation to be fulfilled |
void |
setSpecName(java.lang.String specName)
Set the specifed name for this reservation. |
void |
setStartDate(java.util.Date startDate)
Set the start date of the reservation. |
void |
setStatistics(ReservationStatistics statistics)
Set reservation's statistical information that Moab reports to MCM |
void |
setSubType(java.lang.String subType)
Set the reservation sub-type. |
void |
setTaskCount(int taskCount)
Set the number of tasks currently allocated for the reservation |
void |
setTracked(boolean isTracked)
Returns true if the reservation is being tacked by Moab |
void |
setTriggerList(java.util.Set<Trigger> triggerList)
|
void |
setType(ReservationType type)
Set the list of triggers attached to the reservation. |
void |
setUIndex(java.lang.String index)
Set the globally unique reservation index |
void |
setVariables(java.util.Set<Variable> variables)
Set the variables attached to this reservation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Reservation()
Method Detail |
---|
public void addAclObject(ACLRule aclObject) throws InvalidMoabArgumentException
aclObject
-
InvalidMoabArgumentException
- If acl object is nullpublic void addVariable(Variable var)
var
- The variable to add.public java.lang.String allocatedNodesToString()
public boolean containsAllocatedNode(MoabNode node)
node
- MoabNode to search for
public java.lang.String getAccountingAccount()
public java.lang.String getAccountingClass()
public java.lang.String getAccountingGroup()
public java.lang.String getAccountingQOS()
public java.lang.String getAccountingUser()
public ACL getACL()
public java.lang.String getACLString()
public java.util.Set<MoabNode> getAllocatedNodes()
public int getAllocNodeCount()
public int getAllocProcCount()
public int getAllocTaskCount()
public java.lang.String getComments()
public java.util.Date getCreationDate()
public java.lang.String getCredentials()
public long getDuration()
public java.util.Date getEndDate()
public long getEndTimeInSeconds()
public java.util.Date getExpireDate()
public ReservationFlags getFlags()
public java.lang.String getFormattedEndTime()
public java.lang.String getFormattedStartTime()
public java.lang.String getGlobalID()
public java.lang.String getHostListExpression()
public JobReservation getJobInformation()
public int getMaxTasks()
public java.lang.String getMessages()
public java.lang.String getName()
public NodeSetPolicy getNodeSetPolicy()
public java.lang.String getOwner()
public com.moab.api.partitions.Partition getPartition()
public java.lang.String getProfile()
public ReservationRequirements getRequirements()
Get the requirements that this reservation needs in order to be fulfilled.
Cannot be null.
public java.lang.String getResources()
public java.lang.String getSpecName()
public java.util.Date getStartDate()
public long getStartTimeInSeconds()
public ReservationStatistics getStatistics()
public java.lang.String getSubType()
public int getTaskCount()
public java.util.Set<Trigger> getTriggerList()
public ReservationType getType()
public java.lang.String getUIndex()
public java.util.Set<Variable> getVariables()
public boolean isActive()
public boolean isTracked()
public void setAccountingAccount(java.lang.String accountingAccount)
accountingAccount
- the accountable account for the reservationpublic void setAccountingClass(java.lang.String accountingClass)
accountingClass
- the accountable class for the reservationpublic void setAccountingGroup(java.lang.String accountingGroup)
accountingGroup
- the accountable group for the reservationpublic void setAccountingQOS(java.lang.String accountingQOS)
accountingQOS
- the accountable QOS for the reservationpublic void setAccountingUser(java.lang.String accountingUser)
accountingUser
- the accountable user for the reservationpublic void setACL(ACL acl)
acl
- a ACL collection with a set the list of users, groups,
accounts, classes and qoses that can access the reservation.public void setActive(boolean isActive)
isActive
- Set if reservation is currently activepublic void setAllocatedNodeList(java.lang.String nodeStr)
nodeStr
- Comma delimited string representing nodespublic void setAllocatedNodes(java.util.Set<MoabNode> allocatedNodes)
allocatedNodes
- the list of MoabNodes that contains all nodes that are
currently allocated to the reservationpublic void setAllocNodeCount(int allocNodeCount)
allocNodeCount
- the number of allocated nodes for the reservationpublic void setAllocProcCount(int allocProcCount)
allocProcCount
- the number of allocated processors for the reservationpublic void setAllocTaskCount(int allocTaskCount)
allocTaskCount
- the number of allocated tasks for the reservationpublic void setComments(java.lang.String comments)
comments
- String object containing reservation's commentspublic void setCreationDate(java.util.Date creationDate)
creationDate
- the reservation's creation datepublic void setCredentials(java.lang.String credentials)
credentials
- the credentials for the reservationpublic void setDuration(long duration)
duration
- the duration of this reservation in seconds.public void setEndDate(java.util.Date endDate)
endDate
- the end date of the reservation.public void setExpireDate(java.util.Date expireDate)
expireDate
- the reservation's expiration datepublic void setFlags(ReservationFlags flags)
flags
- the reservation flags associated to this reservationpublic void setGlobalID(java.lang.String globalID)
globalID
- the globalID as defined in Moabpublic void setHostListExpression(java.lang.String hostListExpression)
hostListExpression
- the user-specified host list expressionpublic void setHostListExpression(java.util.List<java.lang.String> nodeNames)
nodeNames
- a list of node namespublic void setJobInformation(JobReservation jobInformation)
jobInformation
- the job information for this reservation.public void setMaxTasks(int maxTasks)
maxTasks
- the max number of tasks that can be assigned for the
reservation.public void setMessages(java.lang.String messages)
messages
- the messages added to the reservationpublic void setName(java.lang.String name)
name
- the reservation namepublic void setNodeSetPolicy(NodeSetPolicy nodeSetPolicy)
nodeSetPolicy
- the nodeSetPolicy to set for this reservationpublic void setOwner(java.lang.String owner)
owner
- the reservation's owner's namepublic void setPartition(com.moab.api.partitions.Partition partition)
partition
- the partition that the reservation is running on or assigned
topublic void setProfile(java.lang.String profile)
profile
- the profile that this reservation is (or will be) using.public void setRequirements(ReservationRequirements requirements) throws InvalidMoabArgumentException
requirements
- the requirements that this reservation needs in order to be
fulfilled
InvalidMoabArgumentException
- thrown if requirements is null.public void setResources(java.lang.String resources)
resources
- the resources assigned or required for the reservation to be
fulfilledpublic void setSpecName(java.lang.String specName)
specName
- The specifed name for this reservation. This is either a
user-specified name or a moab-specified name such as 'system'
but it is NOT a unique identifier for this reserveration.public void setStartDate(java.util.Date startDate)
startDate
- the start date of the reservationpublic void setStatistics(ReservationStatistics statistics)
statistics
- reservation's statistical information that Moab reports to MCMpublic void setSubType(java.lang.String subType)
subType
- the reservation sub-type.public void setTaskCount(int taskCount)
taskCount
- the number of tasks currently allocated for the reservationpublic void setTracked(boolean isTracked)
isTracked
- set true if the reservation is being tacked by Moabpublic void setTriggerList(java.util.Set<Trigger> triggerList)
triggerList
- the triggerList to setpublic void setType(ReservationType type)
type
- he list of triggers attached to the reservation.public void setUIndex(java.lang.String index)
index
- the globally unique reservation indexpublic void setVariables(java.util.Set<Variable> variables)
variables
- the variables attached to this reservation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |