com.ace.moab.api.triggers
Class Trigger

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

public class Trigger
extends java.lang.Object
implements java.lang.Comparable<Trigger>, java.io.Serializable

This class represents a Moab trigger. Moab can launch events or triggers based on certain events. For example, an administrator may want to send an email to the owner of a particular reservation when the usage drops below a specific threshold. Or a user may want to launch an evaluation script 5 minutes before his job is scheduled for completion. Triggers can be associated with jobs, nodes, reservations, or the core scheduler and enable actions to be taken when the specified event, offset, and threshold criteria are satisfied.

See Also:
Serialized Form

Field Summary
static int UNDEFINED
          Used to allow certain values to be undefined.
 
Constructor Summary
Trigger()
           
 
Method Summary
 int compareTo(Trigger trigger)
           
 java.lang.String getAction()
          Getter for property Action.
 TriggerActionType getActionType()
          Getter for property ActionType.
 long getActualLaunchTime()
          Getter for property LaunchTime.
 long getBlockTime()
          Getter for property MoabTimeout.
 java.lang.String getDescription()
          Get the description of this trigger.
 long getEstimatedLaunchTime()
          Getter for property EventLaunchTime.
 TriggerEventType getEventType()
          Getter for property TriggerType.
 long getFailOffset()
          Get the fail time offset in seconds
 TriggerFlags getFlags()
          Get the flags belonging to this trigger
 long getLaunchOffset()
          Getter for property Offset.
 java.lang.String getMessage()
          Getter for property MoabMessages.
 java.lang.String getMoabCreateCommand()
          Creates the full scheduler command necessary to add a trigger to Moab dynamically.
 java.lang.String getMoabModifyCommand()
          Creates a Moab command necessary to modify key attributes of the trigger.
 java.lang.String getObjectID()
          Getter for property ObjectID.
 java.lang.String getObjectType()
          Getter for property ObjectType.
 TriggerPeriod getPeriod()
           
 int getProcessID()
          Getter for property ProcessID.
 long getRearmDelayTime()
          Getter for property RearmDelayTime.
 java.util.Set<TriggerVariable> getRequiredVariables()
          Getter for property RequiredValues.
 java.lang.String getRequiredVariablesString()
          Get the required variables as a string.
 java.util.Set<TriggerVariable> getSetVariables()
          Getter for property SetValues.
 java.lang.String getSetVariablesString()
          Get the list of variables this trigger sets as a string.
 java.lang.String getStandardError()
          Getter for property StandardError.
 java.lang.String getStandardOut()
          Getter for property StandardOut.
 TriggerState getState()
          Getter for property TriggerState.
 TriggerThreshold getThreshold()
          Getter for property Threshold.
 long getTimeout()
          Getter for property TriggerTimeout.
 java.lang.String getTriggerCommandAttributes()
          Gets a Moab-compatible form of trigger attributes to attach to a moab command For example, 'mschedctl -m trigger' + getTriggerCommandAttributes could be used to create a trigger with the attributes specified in this object
 java.lang.String getTriggerID()
          Getter for property TriggerID.
 java.lang.String getTriggerName()
          Getter for property TriggerName.
 java.util.Set<TriggerVariable> getUnsetVariables()
          Set the variables that are unset by this trigger.
 java.lang.String getUnsetVariablesString()
          Get the variables that are unset by this trigger as a string.
 boolean isFailureDetected()
          Getter for property FailureDetected.
 boolean isTriggerCompleted()
          Getter for property TriggerCompleted.
 void setAction(java.lang.String Action)
          Setter for property Action.
 void setActionType(TriggerActionType actionType)
          Setter for property ActionType.
 void setActualLaunchTime(long actualLaunchTime)
          Setter for property LaunchTime.
 void setBlockTime(long blockTime)
          Setter for property MoabTimeout.
 void setDescription(java.lang.String description)
          Set the description of this trigger.
 void setEstimatedLaunchTime(long estimatedLaunchTime)
          Setter for property EventLaunchTime.
 void setEventType(TriggerEventType eventType)
          Setter for property TriggerType.
 void setFailOffset(long failOffset)
          Set the fail offset time in seconds
 void setFailureDetected(boolean FailureDetected)
          Setter for property FailureDetected.
 void setFlags(TriggerFlags flags)
          Sets the flags that belong to this trigger.
 void setId(java.lang.String TriggerID)
          Setter for property TriggerID.
 void setLaunchOffset(long offset)
          Setter for property Offset.
 void setMessage(java.lang.String message)
          Setter for property MoabMessages.
 void setName(java.lang.String TriggerName)
          Setter for property TriggerName.
 void setObjectID(java.lang.String ObjectID)
          Setter for property ObjectID.
 void setObjectType(java.lang.String ObjectType)
          Setter for property ObjectType.
 void setPeriod(TriggerPeriod period)
          Set the trigger's period.
 void setProcessID(int processID)
          Setter for property ProcessID.
 void setRearmDelayTime(long rearmDelayTime)
          Setter for property RearmDelayTime.
 void setRequiredVariables(java.util.Set<TriggerVariable> RequiredValues)
          Setter for property RequiredValues.
 void setSetVariables(java.util.Set<TriggerVariable> setVariables)
          Setter for property SetValues.
 void setStandardErrorOutput(java.lang.String StandardError)
          Setter for property StandardError.
 void setStandardOutOutput(java.lang.String StandardOut)
          Setter for property StandardOut.
 void setState(TriggerState state)
          Setter for property TriggerState.
 void setThreshold(TriggerThreshold thresholdStr)
          Setter for property Threshold.
 void setTimeout(long timeout)
          Setter for property TriggerTimeout.
 void setTriggerCompleted(boolean TriggerCompleted)
          Setter for property TriggerCompleted.
 void setUnsetVariables(java.util.Set<TriggerVariable> unsetVariables)
          Set the variables that are unset by this trigger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNDEFINED

public static int UNDEFINED
Used to allow certain values to be undefined.

Constructor Detail

Trigger

public Trigger()
Method Detail

getAction

public java.lang.String getAction()
Getter for property Action.

Returns:
Value of property Action.

getActionType

public TriggerActionType getActionType()
Getter for property ActionType.

Returns:
Value of property ActionType.

getActualLaunchTime

public long getActualLaunchTime()
Getter for property LaunchTime.

Returns:
Value of property LaunchTime.

getBlockTime

public long getBlockTime()
Getter for property MoabTimeout.

Returns:
Value of property MoabTimeout.

getDescription

public java.lang.String getDescription()
Get the description of this trigger.

Returns:
the description of the trigger.

getEstimatedLaunchTime

public long getEstimatedLaunchTime()
Getter for property EventLaunchTime.

Returns:
Value of property EventLaunchTime.

getEventType

public TriggerEventType getEventType()
Getter for property TriggerType.

Returns:
Value of property TriggerType.

getFailOffset

public long getFailOffset()
Get the fail time offset in seconds

Returns:
the fail time offset in seconds.

getFlags

public TriggerFlags getFlags()
Get the flags belonging to this trigger

Returns:
the flags belonging to this trigger.

getLaunchOffset

public long getLaunchOffset()
Getter for property Offset.

Returns:
Value of property Offset.

getMessage

public java.lang.String getMessage()
Getter for property MoabMessages.

Returns:
Value of property MoabMessages.

getMoabCreateCommand

public java.lang.String getMoabCreateCommand()
Creates the full scheduler command necessary to add a trigger to Moab dynamically. This command attaches a trigger to an object that already exists in the scheduler's system.

Returns:
the Moab command necessary to save this trigger object in the scheduler.

getMoabModifyCommand

public java.lang.String getMoabModifyCommand()
Creates a Moab command necessary to modify key attributes of the trigger. These attributes include object type, action type, and event type.

Returns:
the Moab command necessary to modify a trigger already seen by the scheduler.

getObjectID

public java.lang.String getObjectID()
Getter for property ObjectID.

Returns:
Value of property ObjectID.

getObjectType

public java.lang.String getObjectType()
Getter for property ObjectType.

Returns:
Value of property ObjectType.

getPeriod

public TriggerPeriod getPeriod()

getProcessID

public int getProcessID()
Getter for property ProcessID.

Returns:
Value of property ProcessID.

getRearmDelayTime

public long getRearmDelayTime()
Getter for property RearmDelayTime.

Returns:
Value of property RearmDelayTime.

getRequiredVariables

public java.util.Set<TriggerVariable> getRequiredVariables()
Getter for property RequiredValues.

Returns:
Value of property RequiredValues.

getRequiredVariablesString

public java.lang.String getRequiredVariablesString()
Get the required variables as a string.

Returns:
the required variables as a string.

getSetVariables

public java.util.Set<TriggerVariable> getSetVariables()
Getter for property SetValues.

Returns:
Value of property SetValues.

getSetVariablesString

public java.lang.String getSetVariablesString()
Get the list of variables this trigger sets as a string.

Returns:
the list of variables this trigger sets as a string.

getStandardError

public java.lang.String getStandardError()
Getter for property StandardError.

Returns:
Value of property StandardError.

getStandardOut

public java.lang.String getStandardOut()
Getter for property StandardOut.

Returns:
Value of property StandardOut.

getState

public TriggerState getState()
Getter for property TriggerState.

Returns:
Value of property TriggerState.

getThreshold

public TriggerThreshold getThreshold()
Getter for property Threshold.

Returns:
Value of property Threshold.

getTimeout

public long getTimeout()
Getter for property TriggerTimeout.

Returns:
Value of property TriggerTimeout.

getTriggerID

public java.lang.String getTriggerID()
Getter for property TriggerID.

Returns:
Value of property TriggerID.

getTriggerName

public java.lang.String getTriggerName()
Getter for property TriggerName.

Returns:
Value of property TriggerName.

getUnsetVariables

public java.util.Set<TriggerVariable> getUnsetVariables()
Set the variables that are unset by this trigger.

Returns:
the variables that are unset by this trigger.

getUnsetVariablesString

public java.lang.String getUnsetVariablesString()
Get the variables that are unset by this trigger as a string.

Returns:
the variables that are unset by this trigger as a string.

isFailureDetected

public boolean isFailureDetected()
Getter for property FailureDetected.

Returns:
Value of property FailureDetected.

isTriggerCompleted

public boolean isTriggerCompleted()
Getter for property TriggerCompleted.

Returns:
Value of property TriggerCompleted.

setAction

public void setAction(java.lang.String Action)
Setter for property Action.

Parameters:
Action - New value of property Action.

setActionType

public void setActionType(TriggerActionType actionType)
Setter for property ActionType.

Parameters:
actionType - New value of property ActionType.

setActualLaunchTime

public void setActualLaunchTime(long actualLaunchTime)
Setter for property LaunchTime.

Parameters:
actualLaunchTime - New value of property LaunchTime.

setBlockTime

public void setBlockTime(long blockTime)
Setter for property MoabTimeout.

Parameters:
blockTime - New value of property MoabTimeout.

setDescription

public void setDescription(java.lang.String description)
Set the description of this trigger.

Parameters:
description - the description of the trigger.

setEstimatedLaunchTime

public void setEstimatedLaunchTime(long estimatedLaunchTime)
Setter for property EventLaunchTime.

Parameters:
estimatedLaunchTime - New value of property EventLaunchTime.

setEventType

public void setEventType(TriggerEventType eventType)
Setter for property TriggerType.

Parameters:
eventType - New value of property TriggerType.

setFailOffset

public void setFailOffset(long failOffset)
Set the fail offset time in seconds

Parameters:
failOffset - the fail offset time in seconds

setFailureDetected

public void setFailureDetected(boolean FailureDetected)
Setter for property FailureDetected.

Parameters:
FailureDetected - New value of property FailureDetected.

setFlags

public void setFlags(TriggerFlags flags)
Sets the flags that belong to this trigger.

Parameters:
flags - the flags that belong to this trigger.

setId

public void setId(java.lang.String TriggerID)
Setter for property TriggerID.

Parameters:
TriggerID - New value of property TriggerID.

setLaunchOffset

public void setLaunchOffset(long offset)
Setter for property Offset.

Parameters:
offset - New value of property Offset.

setMessage

public void setMessage(java.lang.String message)
Setter for property MoabMessages.

Parameters:
message - New value of property MoabMessages.

setName

public void setName(java.lang.String TriggerName)
Setter for property TriggerName.

Parameters:
TriggerName - New value of property TriggerName.

setObjectID

public void setObjectID(java.lang.String ObjectID)
Setter for property ObjectID.

Parameters:
ObjectID - New value of property ObjectID.

setObjectType

public void setObjectType(java.lang.String ObjectType)
Setter for property ObjectType.

Parameters:
ObjectType - New value of property ObjectType.

setPeriod

public void setPeriod(TriggerPeriod period)
Set the trigger's period.

Parameters:
period - the trigger period.

setProcessID

public void setProcessID(int processID)
Setter for property ProcessID.

Parameters:
processID - New value of property ProcessID.

setRearmDelayTime

public void setRearmDelayTime(long rearmDelayTime)
Setter for property RearmDelayTime.

Parameters:
rearmDelayTime - New value of property RearmDelayTime.

setRequiredVariables

public void setRequiredVariables(java.util.Set<TriggerVariable> RequiredValues)
Setter for property RequiredValues.

Parameters:
RequiredValues - New value of property RequiredValues.

setSetVariables

public void setSetVariables(java.util.Set<TriggerVariable> setVariables)
Setter for property SetValues.

Parameters:
setVariables - New value of property SetValues.

setStandardErrorOutput

public void setStandardErrorOutput(java.lang.String StandardError)
Setter for property StandardError.

Parameters:
StandardError - New value of property StandardError.

setStandardOutOutput

public void setStandardOutOutput(java.lang.String StandardOut)
Setter for property StandardOut.

Parameters:
StandardOut - New value of property StandardOut.

setState

public void setState(TriggerState state)
Setter for property TriggerState.

Parameters:
state - New value of property TriggerState.

setThreshold

public void setThreshold(TriggerThreshold thresholdStr)
Setter for property Threshold.

Parameters:
thresholdStr - New value of property Threshold.

setTimeout

public void setTimeout(long timeout)
Setter for property TriggerTimeout.

Parameters:
timeout - New value of property TriggerTimeout.

setTriggerCompleted

public void setTriggerCompleted(boolean TriggerCompleted)
Setter for property TriggerCompleted.

Parameters:
TriggerCompleted - New value of property TriggerCompleted.

setUnsetVariables

public void setUnsetVariables(java.util.Set<TriggerVariable> unsetVariables)
Set the variables that are unset by this trigger.

Parameters:
unsetVariables - the variables that are unset by this trigger.

getTriggerCommandAttributes

public java.lang.String getTriggerCommandAttributes()
Gets a Moab-compatible form of trigger attributes to attach to a moab command For example, 'mschedctl -m trigger' + getTriggerCommandAttributes could be used to create a trigger with the attributes specified in this object

Returns:
Comma delimited String of Command Attributes for this trigger

compareTo

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


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