public abstract class Mapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected LogManager |
mLogger
Handle to the logger.
|
protected PegasusProperties |
mProps
Handle to Pegasus Properties
|
protected SiteStore |
mSiteStore
The handle to the RIC.
|
protected TransformationCatalog |
mTCHandle
The handle to the tranformation catalog.
|
protected TCMap |
mTCMap
Handle to the TCMap
|
static java.lang.String |
PACKAGE_NAME
The name of the package where the implementing classes reside.
|
Modifier | Constructor and Description |
---|---|
protected |
Mapper(PegasusBag bag)
The private constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getMode()
Returns the TCMapper Mode.
|
java.util.List |
getSiteList(java.lang.String namespace,
java.lang.String name,
java.lang.String version,
java.util.List siteids)
Returns a list of sites that are valid sites for a given lfn and a list of sites.
|
abstract java.util.Map |
getSiteMap(java.lang.String namespace,
java.lang.String name,
java.lang.String version,
java.util.List siteids)
This method returns a Map of compute sites to List of
TransformationCatalogEntry objects that are valid for that site.
|
java.util.List |
getTCList(java.lang.String namespace,
java.lang.String name,
java.lang.String version,
java.lang.String siteid)
This method returns a List of TransformationCatalog Objects valid for a
particular transformation and for a particular compute site
|
boolean |
isSiteValid(java.lang.String namespace,
java.lang.String name,
java.lang.String version,
java.lang.String siteid)
Checks if a give site is valid for a given transformation.
|
boolean |
isStageableMapper()
Returns whether this instance of mapper is an instance of a Stageable
mapper or not.
|
static Mapper |
loadTCMapper(java.lang.String className,
PegasusBag bag)
Loads the implementing class corresponding to the mode specified by the user
at runtime in the properties file.
|
public static final java.lang.String PACKAGE_NAME
protected TransformationCatalog mTCHandle
protected SiteStore mSiteStore
protected PegasusProperties mProps
protected TCMap mTCMap
protected LogManager mLogger
protected Mapper(PegasusBag bag)
bag
- the bag of initialization objectspublic static Mapper loadTCMapper(java.lang.String className, PegasusBag bag)
className
- The name of the class that implements the mode. It is the
name of the class, not the complete name with package. That
is added by itself.bag
- the bag of initialization objectspublic boolean isStageableMapper()
public abstract java.util.Map getSiteMap(java.lang.String namespace, java.lang.String name, java.lang.String version, java.util.List siteids)
namespace
- the namespace of the transformation.name
- the name of the transformation.version
- the version of the transformation.siteids
- the sites for which you want the map.public abstract java.lang.String getMode()
public java.util.List getTCList(java.lang.String namespace, java.lang.String name, java.lang.String version, java.lang.String siteid)
namespace
- the namespace of the transformation.name
- the name of the transformation.version
- the version of the transformation.siteid
- the compute site for which you want the List.public java.util.List getSiteList(java.lang.String namespace, java.lang.String name, java.lang.String version, java.util.List siteids)
namespace
- the namespace of the transformation.name
- the name of the transformation.version
- the version of the transformation.siteids
- the list of sites on which the transformation is to be checked.public boolean isSiteValid(java.lang.String namespace, java.lang.String name, java.lang.String version, java.lang.String siteid)
namespace
- the namespace of the transformation.name
- the name of the transformation.version
- the version of the transformation.siteid
- the site that needs to be checked.