edu.isi.pegasus.planner.classes
Class PegasusBag

java.lang.Object
  extended by edu.isi.pegasus.planner.classes.PegasusBag
All Implemented Interfaces:
Bag

public class PegasusBag
extends Object
implements Bag

A bag of objects that needs to be passed to various refiners. It contains handles to the various catalogs, the properties and the planner options.

Version:
$Revision: 4628 $
Author:
Karan Vahi

Field Summary
private  LogManager mLogger
          The handle to the LogManager.
private  PlannerOptions mPOptions
          The options passed to the planner.
private  PegasusProperties mProps
          The handle to the PegasusProperties.
private  ReplicaCatalog mRCHandle
          The handle to the replica catalog.
private  PoolInfoProvider mSCHandle
          The handle to the site catalog.
private  SiteStore mSiteStore
          The site store containing the sites that need to be used.
private  TransformationCatalog mTCHandle
          The handle to the transformation catalog.
private  Mapper mTCMapper
          The handle to the Transformation Mapper.
private  ReplicaCatalog mTransientRC
          The transient replica catalog that tracks the files created or transferred during the workflow
private  Map<String,String> mWorkerPackageMap
          Worker Package Map, that indexes execution site with the location of the corresponding worker package in the submit directory
static String[] PEGASUS_INFO
          Array storing the names of the attributes that are stored with the site.
static Integer PEGASUS_LOGMANAGER
          The constant to be passed to the accessor functions to get or set the handle to the Logging manager
static Integer PEGASUS_PROPERTIES
          The constant to be passed to the accessor functions to get or set the PegasusProperties.
static Integer PLANNER_OPTIONS
          The constant to be passed to the accessor functions to get or set the options passed to the planner.
static Integer REPLICA_CATALOG
          The constant to be passed to the accessor functions to get or set the handle to the replica catalog
static Integer SITE_CATALOG
          The constant to be passed to the accessor functions to get or set the handle to the site catalog.
static Integer SITE_STORE
          The constant to be passed to the accessor functions to get or set the handle to the Site Store
static Integer TRANSFORMATION_CATALOG
          The constant to be passed to the accessor functions to get or set the handle to the transformation catalog.
static Integer TRANSFORMATION_MAPPER
          The constant to be passed to the accessor functions to get or set the handle to the Transformation Mapper.
static Integer TRANSIENT_REPLICA_CATALOG
          The constant to be passed to the accessor functions to get or set the handle to the transient replica catalog
static Integer WORKER_PACKAGE_MAP
          The constant to be passed to the accessor functions to get or set the handle to the worker package maps
 
Constructor Summary
PegasusBag()
          The default constructor.
 
Method Summary
 boolean add(Object key, Object value)
          Adds an object to the underlying bag corresponding to a particular key.
 boolean containsKey(Object key)
          Returns true if the namespace contains a mapping for the specified key.
 Object get(Object key)
          Returns an objects corresponding to the key passed.
 SiteStore getHandleToSiteStore()
          A convenice method to get the handle to the site store
 TransformationCatalog getHandleToTransformationCatalog()
          A convenice method to get the handle to the transformation catalog.
 Mapper getHandleToTransformationMapper()
          A convenice method to get the handle to the transformation mapper.
 ReplicaCatalog getHandleToTransientReplicaCatalog()
          A convenice method to get the handle to the transient replica catalog
private  int getIntValue(Object key)
          A convenience method to get the intValue for the object passed.
 LogManager getLogger()
          A convenice method to get Logger/
 PegasusProperties getPegasusProperties()
          A convenice method to get PegasusProperties
 PlannerOptions getPlannerOptions()
          A convenice method to get PlannerOptions
 Map<String,String> getWorkerPackageMap()
          A convenice method to get the worker package
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PEGASUS_INFO

public static final String[] PEGASUS_INFO
Array storing the names of the attributes that are stored with the site.


PEGASUS_PROPERTIES

public static final Integer PEGASUS_PROPERTIES
The constant to be passed to the accessor functions to get or set the PegasusProperties.


PLANNER_OPTIONS

public static final Integer PLANNER_OPTIONS
The constant to be passed to the accessor functions to get or set the options passed to the planner.


REPLICA_CATALOG

public static final Integer REPLICA_CATALOG
The constant to be passed to the accessor functions to get or set the handle to the replica catalog


SITE_CATALOG

public static final Integer SITE_CATALOG
The constant to be passed to the accessor functions to get or set the handle to the site catalog.


TRANSFORMATION_CATALOG

public static final Integer TRANSFORMATION_CATALOG
The constant to be passed to the accessor functions to get or set the handle to the transformation catalog.


TRANSFORMATION_MAPPER

public static final Integer TRANSFORMATION_MAPPER
The constant to be passed to the accessor functions to get or set the handle to the Transformation Mapper.


PEGASUS_LOGMANAGER

public static final Integer PEGASUS_LOGMANAGER
The constant to be passed to the accessor functions to get or set the handle to the Logging manager


SITE_STORE

public static final Integer SITE_STORE
The constant to be passed to the accessor functions to get or set the handle to the Site Store


TRANSIENT_REPLICA_CATALOG

public static final Integer TRANSIENT_REPLICA_CATALOG
The constant to be passed to the accessor functions to get or set the handle to the transient replica catalog


WORKER_PACKAGE_MAP

public static final Integer WORKER_PACKAGE_MAP
The constant to be passed to the accessor functions to get or set the handle to the worker package maps


mProps

private PegasusProperties mProps
The handle to the PegasusProperties.


mPOptions

private PlannerOptions mPOptions
The options passed to the planner.


mRCHandle

private ReplicaCatalog mRCHandle
The handle to the replica catalog.


mSCHandle

private PoolInfoProvider mSCHandle
The handle to the site catalog.


mTCHandle

private TransformationCatalog mTCHandle
The handle to the transformation catalog.


mTCMapper

private Mapper mTCMapper
The handle to the Transformation Mapper.


mLogger

private LogManager mLogger
The handle to the LogManager.


mSiteStore

private SiteStore mSiteStore
The site store containing the sites that need to be used.


mTransientRC

private ReplicaCatalog mTransientRC
The transient replica catalog that tracks the files created or transferred during the workflow


mWorkerPackageMap

private Map<String,String> mWorkerPackageMap
Worker Package Map, that indexes execution site with the location of the corresponding worker package in the submit directory

Constructor Detail

PegasusBag

public PegasusBag()
The default constructor.

Method Detail

add

public boolean add(Object key,
                   Object value)
Adds an object to the underlying bag corresponding to a particular key.

Specified by:
add in interface Bag
Parameters:
key - the key with which the value has to be associated.
value - the value to be associated with the key.
Returns:
boolean indicating if insertion was successful.

containsKey

public boolean containsKey(Object key)
Returns true if the namespace contains a mapping for the specified key.

Specified by:
containsKey in interface Bag
Parameters:
key - The key that you want to search for in the bag.
Returns:
boolean

get

public Object get(Object key)
Returns an objects corresponding to the key passed.

Specified by:
get in interface Bag
Parameters:
key - the key corresponding to which the objects need to be returned.
Returns:
the object that is found corresponding to the key or null.

getPlannerOptions

public PlannerOptions getPlannerOptions()
A convenice method to get PlannerOptions

Returns:
the handle to options passed to the planner.

getPegasusProperties

public PegasusProperties getPegasusProperties()
A convenice method to get PegasusProperties

Returns:
the handle to the properties.

getLogger

public LogManager getLogger()
A convenice method to get Logger/

Returns:
the handle to the logger.

getHandleToSiteStore

public SiteStore getHandleToSiteStore()
A convenice method to get the handle to the site store

Returns:
the handle to site store

getHandleToTransientReplicaCatalog

public ReplicaCatalog getHandleToTransientReplicaCatalog()
A convenice method to get the handle to the transient replica catalog

Returns:
the handle to transient replica catalog

getHandleToTransformationCatalog

public TransformationCatalog getHandleToTransformationCatalog()
A convenice method to get the handle to the transformation catalog.

Returns:
the handle to transformation catalog

getHandleToTransformationMapper

public Mapper getHandleToTransformationMapper()
A convenice method to get the handle to the transformation mapper.

Returns:
the handle to transformation catalog

getWorkerPackageMap

public Map<String,String> getWorkerPackageMap()
A convenice method to get the worker package

Returns:
the handle to worker package map

getIntValue

private int getIntValue(Object key)
A convenience method to get the intValue for the object passed.

Parameters:
key - the key to be converted
Returns:
the int value if object an integer, else -1


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