public abstract class Mapper extends 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 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 String |
getMode()
Returns the TCMapper Mode.
|
List |
getSiteList(String namespace,
String name,
String version,
List siteids)
Returns a list of sites that are valid sites for a given lfn and a list of sites.
|
abstract Map |
getSiteMap(String namespace,
String name,
String version,
List siteids)
This method returns a Map of compute sites to List of
TransformationCatalogEntry objects that are valid for that site.
|
List |
getTCList(String namespace,
String name,
String version,
String siteid)
This method returns a List of TransformationCatalog Objects valid for a
particular transformation and for a particular compute site
|
boolean |
isSiteValid(String namespace,
String name,
String version,
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(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 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(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 Map getSiteMap(String namespace, String name, String version, 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 String getMode()
public List getTCList(String namespace, String name, String version, 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 List getSiteList(String namespace, String name, String version, 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(String namespace, String name, String version, 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.Copyright © 2011 The University of Southern California. All Rights Reserved.