Class Adapter
- java.lang.Object
-
- edu.isi.pegasus.planner.catalog.site.classes.Adapter
-
public class Adapter extends java.lang.ObjectAn 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 voidaddDirectory(SiteCatalogEntry3 entry, Directory directory)Adds a directory to the site catalog entry object.static SiteCatalogEntry3convert(SiteCatalogEntry entry)An adapter method that converts theSiteCatalogEntryobject toSiteCatalogEntry3object.static SiteCatalogEntryconvert(SiteCatalogEntry3 entry)An adapter method that converts theSiteCatalogEntry3object toSiteCatalogEntryobject.
-
-
-
Method Detail
-
convert
public static SiteCatalogEntry convert(SiteCatalogEntry3 entry)
An adapter method that converts theSiteCatalogEntry3object toSiteCatalogEntryobject. 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-SiteCatalogEntry3to be converted.- Returns:
- the converted
SiteCatalogEntry3object.
-
convert
public static SiteCatalogEntry3 convert(SiteCatalogEntry entry)
An adapter method that converts theSiteCatalogEntryobject toSiteCatalogEntry3object. 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-SiteCatalogEntryto be converted.- Returns:
- the converted
SiteCatalogEntry3object.
-
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
-
-