Class PegasusBag

  • All Implemented Interfaces:
    Bag

    public class PegasusBag
    extends java.lang.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$
    Author:
    Karan Vahi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private LogManager mLogger
      The handle to the LogManager.
      private PlannerCache mPlannerCache
      The transient replica catalog that tracks the files created or transferred during the workflow
      private PlannerMetrics mPMetrics
      The planner metrics to use.
      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 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 boolean mUsesPMC
      A boolean indicating whether we use PMC or not
      private java.util.Map<java.lang.String,​java.lang.String> mWorkerPackageMap
      Worker Package Map, that indexes execution site with the location of the corresponding worker package in the submit directory
      static java.lang.String[] PEGASUS_INFO
      Array storing the names of the attributes that are stored with the site.
      static java.lang.Integer PEGASUS_LOGMANAGER
      The constant to be passed to the accessor functions to get or set the handle to the Logging manager
      static java.lang.Integer PEGASUS_PROPERTIES
      The constant to be passed to the accessor functions to get or set the PegasusProperties.
      static java.lang.Integer PLANNER_CACHE
      The constant to be passed to the accessor functions to get or set the handle to the planner cache for planning purposes.
      static java.lang.Integer PLANNER_METRICS
      The constant to be passed to the accessor functions to get or set the the planner metrics that are logged during the planning purpose
      static java.lang.Integer PLANNER_OPTIONS
      The constant to be passed to the accessor functions to get or set the options passed to the planner.
      static java.lang.Integer REPLICA_CATALOG
      The constant to be passed to the accessor functions to get or set the handle to the replica catalog
      static java.lang.Integer SITE_CATALOG
      The constant to be passed to the accessor functions to get or set the handle to the site catalog.
      static java.lang.Integer SITE_STORE
      The constant to be passed to the accessor functions to get or set the handle to the Site Store
      static java.lang.Integer TRANSFORMATION_CATALOG
      The constant to be passed to the accessor functions to get or set the handle to the transformation catalog.
      static java.lang.Integer TRANSFORMATION_MAPPER
      The constant to be passed to the accessor functions to get or set the handle to the Transformation Mapper.
      static java.lang.Integer USES_PMC
      The constant to be passed to the accessor functions to get or set the whether the planner used PMC or not
      static java.lang.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

      Constructors 
      Constructor Description
      PegasusBag()
      The default constructor.
    • Field Detail

      • PEGASUS_INFO

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

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

        public static final java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.Integer SITE_STORE
        The constant to be passed to the accessor functions to get or set the handle to the Site Store
      • PLANNER_CACHE

        public static final java.lang.Integer PLANNER_CACHE
        The constant to be passed to the accessor functions to get or set the handle to the planner cache for planning purposes.
      • WORKER_PACKAGE_MAP

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

        public static final java.lang.Integer USES_PMC
        The constant to be passed to the accessor functions to get or set the whether the planner used PMC or not
      • PLANNER_METRICS

        public static final java.lang.Integer PLANNER_METRICS
        The constant to be passed to the accessor functions to get or set the the planner metrics that are logged during the planning purpose
      • mPOptions

        private PlannerOptions mPOptions
        The options passed to the planner.
      • mRCHandle

        private ReplicaCatalog mRCHandle
        The handle to the replica 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.
      • mPlannerCache

        private PlannerCache mPlannerCache
        The transient replica catalog that tracks the files created or transferred during the workflow
      • mWorkerPackageMap

        private java.util.Map<java.lang.String,​java.lang.String> mWorkerPackageMap
        Worker Package Map, that indexes execution site with the location of the corresponding worker package in the submit directory
      • mUsesPMC

        private boolean mUsesPMC
        A boolean indicating whether we use PMC or not
      • mPMetrics

        private PlannerMetrics mPMetrics
        The planner metrics to use.
    • Constructor Detail

      • PegasusBag

        public PegasusBag()
        The default constructor.
    • Method Detail

      • add

        public boolean add​(java.lang.Object key,
                           java.lang.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​(java.lang.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 java.lang.Object get​(java.lang.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
      • getHandleToPlannerCache

        public PlannerCache getHandleToPlannerCache()
        A convenice method to get the handle to the planner cache
        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 java.util.Map<java.lang.String,​java.lang.String> getWorkerPackageMap()
        A convenice method to get the worker package
        Returns:
        the handle to worker package map
      • plannerUsesPMC

        public boolean plannerUsesPMC()
        A convenice method to return whether the planner used PMC or not
        Returns:
        boolean indicating whether PMC was used or not
      • getIntValue

        private int getIntValue​(java.lang.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