Class 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 Detail

      • Adapter

        public Adapter()
    • Method Detail

      • convert

        public static SiteCatalogEntry convert​(SiteCatalogEntry3 entry)
        An adapter method that converts the SiteCatalogEntry3 object to SiteCatalogEntry 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 the SiteCatalogEntry object to SiteCatalogEntry3 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 is
          shared-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 object
        directory - the directory to be added