edu.isi.pegasus.planner.refiner
Class Engine

java.lang.Object
  extended by edu.isi.pegasus.planner.refiner.Engine
Direct Known Subclasses:
CleanupEngine, CreateDirectory, DataReuseEngine, DeployWorkerPackage, InterPoolEngine, MainEngine, NodeCollapser, ReductionEngine, RemoveDirectory, ReplicaCatalogBridge, TransferEngine

public abstract class Engine
extends Object

The class which is a superclass of all the various Engine classes. It defines common methods and member variables.

Version:
$Revision: 2582 $
Author:
Karan Vahi, Gaurang Mehta

Field Summary
protected  PegasusBag mBag
          The bag of initialization objects
protected  LogManager mLogger
          The logging object which is used to log all the messages.
protected  String mLogMsg
          Contains the message which is to be logged by Pegasus.
protected static String mOutputPool
          The pool on which all the output data should be transferred.
protected  String mPoolFile
          The path to the file containing the pool information.
protected  PlannerOptions mPOptions
          Contains the various options to the Planner as passed by the user at runtime.
protected  PegasusProperties mProps
          The object holding all the properties pertaining to Pegasus.
protected  String mRLIUrl
          The Replica Location Index URL got from vds.rls.url property
protected  SiteStore mSiteStore
          The handle to the Pool Info Provider.
protected  String mTCFile
          The path to the file containing the pool information.
protected  TransformationCatalog mTCHandle
          The handle to the Transformation Catalog.
protected  String mTCMode
          Defines the read mode for transformation catalog.
static String REGISTRATION_UNIVERSE
           
static String TRANSFER_UNIVERSE
           
 
Constructor Summary
Engine(PegasusBag bag)
          A pratically nothing constructor !
 
Method Summary
 Vector addVector(Vector from_vector, Vector to_vector)
          Adds elements (PegasusFile type) in a Vector to another Vector and returns the new Vector.
 void appendArrayList(ArrayList dest, ArrayList source)
          It appends the source list at the end of the destination list.
 void loadProperties()
          Loads all the properties that are needed by the Engine classes.
 void printVector(String heading, Vector vector)
          It prints the contents of the Vector, with the first line being the heading.
 boolean stringInList(String stringName, List list)
           
 boolean stringInPegVector(String stringName, Vector vector)
          Returns true if a particular String is in the Vector of PegasusFile objects.
 boolean stringInVector(String stringName, Vector vector)
          Returns true if a particular String is in the Vector of strings.
 String vectorToString(String heading, Vector vector)
          It prints the contents of the Vector, to a String with the first line being the heading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REGISTRATION_UNIVERSE

public static final String REGISTRATION_UNIVERSE
See Also:
Constant Field Values

TRANSFER_UNIVERSE

public static final String TRANSFER_UNIVERSE
See Also:
Constant Field Values

mOutputPool

protected static String mOutputPool
The pool on which all the output data should be transferred.


mProps

protected PegasusProperties mProps
The object holding all the properties pertaining to Pegasus.


mPoolFile

protected String mPoolFile
The path to the file containing the pool information. By default it is $PEGASUS_HOME/etc/pool.config


mTCHandle

protected TransformationCatalog mTCHandle
The handle to the Transformation Catalog. It must be instantiated in the implementing class.


mTCFile

protected String mTCFile
The path to the file containing the pool information. By default it is $PEGASUS_HOME/etc/tc.data.


mSiteStore

protected SiteStore mSiteStore
The handle to the Pool Info Provider. It is instantiated in this class


mLogMsg

protected String mLogMsg
Contains the message which is to be logged by Pegasus.


mRLIUrl

protected String mRLIUrl
The Replica Location Index URL got from vds.rls.url property


mTCMode

protected String mTCMode
Defines the read mode for transformation catalog. Whether we want to read all at once or as desired.

See Also:
org.griphyn.common.catalog.transformation.TCMode

mLogger

protected LogManager mLogger
The logging object which is used to log all the messages.


mPOptions

protected PlannerOptions mPOptions
Contains the various options to the Planner as passed by the user at runtime.


mBag

protected PegasusBag mBag
The bag of initialization objects

Constructor Detail

Engine

public Engine(PegasusBag bag)
A pratically nothing constructor !

Parameters:
bag - bag of initialization objects
Method Detail

loadProperties

public void loadProperties()
Loads all the properties that are needed by the Engine classes.


stringInVector

public boolean stringInVector(String stringName,
                              Vector vector)
Returns true if a particular String is in the Vector of strings.

Parameters:
stringName - the String which has to be searched for in the Vector.
vector - the Vector of Strings in which to search for a particular String.
Returns:
boolean on the basis of whether the String in Vector or not.

stringInList

public boolean stringInList(String stringName,
                            List list)

stringInPegVector

public boolean stringInPegVector(String stringName,
                                 Vector vector)
Returns true if a particular String is in the Vector of PegasusFile objects.

Parameters:
stringName - the String which has to be searched for in the Vector.
vector - the Vector of Strings in which to search for a particular String
Returns:
boolean on the basis of whether the String in Vector or not.

addVector

public Vector addVector(Vector from_vector,
                        Vector to_vector)
Adds elements (PegasusFile type) in a Vector to another Vector and returns the new Vector.

Parameters:
from_vector - the source
to_vector - the destination
Returns:
Vector of PegasusFile objects

printVector

public void printVector(String heading,
                        Vector vector)
It prints the contents of the Vector, with the first line being the heading.

Parameters:
heading - The heading you want to give to the text which is printed.
vector - The Vector whose elements you want to print.

vectorToString

public String vectorToString(String heading,
                             Vector vector)
It prints the contents of the Vector, to a String with the first line being the heading.

Parameters:
heading - The heading you want to give to the text which is printed.
vector - The Vector whose elements you want to print.
Returns:
String

appendArrayList

public void appendArrayList(ArrayList dest,
                            ArrayList source)
It appends the source list at the end of the destination list.

Parameters:
dest - the destination list
source - the source list


Copyright © 2011 The University of Southern California. All Rights Reserved.