Package edu.isi.pegasus.planner.common
Class UserOptions
- java.lang.Object
-
- edu.isi.pegasus.planner.common.UserOptions
-
public class UserOptions extends java.lang.ObjectA Singleton wrapper around the PlannerOptions class to get hold of the options specified by the user to run Pegasus. This allows us to get hold of the options anywhere without us messing up with the constructors of classes.- Version:
- $Revision$
- Author:
- Karan Vahi, Gaurang Mehta
- See Also:
org.griphyn.cPlanner.classes.PlannerOptions
-
-
Field Summary
Fields Modifier and Type Field Description private LogManagermLoggerThe Logger object used to log the messages.private PlannerOptionsmPlannerOptsThe object containing all the user options.private static UserOptionsmPOptionsThe object holding the Singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateUserOptions(PlannerOptions opt)The private constructor that initializes the user options.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangenerateRandomDirectory()Returns whether we want to create a Random Directory or not.java.util.SetgetCacheFiles()It returns the set of cache files.java.lang.StringgetDaxFile()Returns the dax file, that was generated by Chimera containing the description of the Abstract plan.java.util.CollectiongetExecutionSites()Returns the list of execution pools where the user wants the data products to be computed.booleangetForceOption()Returns true if the user had asked for the force option.static UserOptionsgetInstance()The method used to invoke the singleton instance from the other classes.static UserOptionsgetInstance(PlannerOptions opt)The method used to invoke the singleton instance the first time, from the CPlanner class.PlannerOptionsgetOptions()Returns the options passed to the planner.java.lang.StringgetOutputPool()Returns output pool where the user wants the data products to be transferred to.java.lang.StringgetRandomDirName()Returns the name of the random directory, only if the generate Random Dir flag is set.java.lang.StringgetSubmitFileDir()Returns the directory where the user wants the submit files to be generated.voidsetExecutionSites(java.util.Collection sites)Sets the execution sites.
-
-
-
Field Detail
-
mPOptions
private static UserOptions mPOptions
The object holding the Singleton instance.
-
mLogger
private LogManager mLogger
The Logger object used to log the messages.
-
mPlannerOpts
private PlannerOptions mPlannerOpts
The object containing all the user options.
-
-
Constructor Detail
-
UserOptions
private UserOptions(PlannerOptions opt)
The private constructor that initializes the user options. This should be invoked from the CPlanner class in the toolkit package.- Throws:
java.lang.RuntimeException- in case of incorrect initialization.
-
-
Method Detail
-
getInstance
public static UserOptions getInstance(PlannerOptions opt)
The method used to invoke the singleton instance the first time, from the CPlanner class.- Parameters:
opt- the object containing the options to the Planner.
-
getInstance
public static UserOptions getInstance()
The method used to invoke the singleton instance from the other classes.
-
getDaxFile
public java.lang.String getDaxFile()
Returns the dax file, that was generated by Chimera containing the description of the Abstract plan.
-
getOutputPool
public java.lang.String getOutputPool()
Returns output pool where the user wants the data products to be transferred to.
-
getOptions
public PlannerOptions getOptions()
Returns the options passed to the planner.- Returns:
- PlannerOptions
-
getSubmitFileDir
public java.lang.String getSubmitFileDir()
Returns the directory where the user wants the submit files to be generated.
-
getExecutionSites
public java.util.Collection getExecutionSites()
Returns the list of execution pools where the user wants the data products to be computed.
-
setExecutionSites
public void setExecutionSites(java.util.Collection sites)
Sets the execution sites.- Parameters:
sites- theSetcontaining the site names.
-
generateRandomDirectory
public boolean generateRandomDirectory()
Returns whether we want to create a Random Directory or not.
-
getCacheFiles
public java.util.Set getCacheFiles()
It returns the set of cache files.
-
getRandomDirName
public java.lang.String getRandomDirName()
Returns the name of the random directory, only if the generate Random Dir flag is set. Else it returns null.
-
getForceOption
public boolean getForceOption()
Returns true if the user had asked for the force option.
-
-