Class Adapter
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.classes.Adapter
-
public class Adapter extends java.lang.Object
An adapter class that converts the SiteCatalogEntry class to older supported formats and vice-versa- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Constructor Summary
Constructors Constructor Description Adapter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
addDirectory(SiteCatalogEntry3 entry, Directory directory)
Adds a directory to the site catalog entry object.static SiteCatalogEntry3
convert(SiteCatalogEntry entry)
An adapter method that converts theSiteCatalogEntry
object toSiteCatalogEntry3
object.static SiteCatalogEntry
convert(SiteCatalogEntry3 entry)
An adapter method that converts theSiteCatalogEntry3
object toSiteCatalogEntry
object.
-
-
-
Method Detail
-
convert
public static SiteCatalogEntry convert(SiteCatalogEntry3 entry)
An adapter method that converts theSiteCatalogEntry3
object toSiteCatalogEntry
object. For the directories, the following mapping is followed. Note that the adapter method while converting does not clone the members. The user need to call on the returned object if they want a cloned copy.HeadNodeFS shared scratch -> shared-scratch HeadNodeFS shared storage -> shared-storage HeadNodeFS local storage -> local-storage WorkerNodeFS local scratch -> local-scratch
- Parameters:
entry
-SiteCatalogEntry3
to be converted.- Returns:
- the converted
SiteCatalogEntry3
object.
-
convert
public static SiteCatalogEntry3 convert(SiteCatalogEntry entry)
An adapter method that converts theSiteCatalogEntry
object toSiteCatalogEntry3
object. For the directories, the following mapping is followed.shared-scratch -> HeadNodeFS shared scratch shared-storage -> HeadNodeFS shared storage local-scratch -> WorkerNodeFS local scratch local-storage -> HeadNodeFS local storage
Note that the adapter method while converting does not clone the members. The user need to call on the returned object if they want a cloned copy.- Parameters:
entry
-SiteCatalogEntry
to be converted.- Returns:
- the converted
SiteCatalogEntry3
object.
-
addDirectory
private static void addDirectory(SiteCatalogEntry3 entry, Directory directory)
Adds a directory to the site catalog entry object. Adding a directory automatically will add a head node filesystem and a worker node filesystem to the SiteCatalogEntry if it does not exist already. The mapping followed isshared-scratch -> HeadNodeFS shared scratch shared-storage -> HeadNodeFS shared storage local-scratch -> WorkerNodeFS local scratch local-storage -> HeadNodeFS local storage
- Parameters:
entry
- the Site Catalog Entry objectdirectory
- the directory to be added
-
-