Class Hints


  • public class Hints
    extends Namespace
    An empty mechanical implementation for the namespace. At present we do not know what the meaning is. The meaning is is determined at the point of writing the submit files.
    Version:
    $Revision$
    Author:
    Karan Vahi, Gaurang Mehta
    • Field Detail

      • NAMESPACE_NAME

        public static final java.lang.String NAMESPACE_NAME
        The name of the namespace that this class implements.
        See Also:
        Constant Field Values
      • GRID_JOB_TYPE_KEY

        public static final java.lang.String GRID_JOB_TYPE_KEY
        The jobmanager universe key.
        See Also:
        Constant Field Values
      • EXECUTION_POOL_KEY

        public static final java.lang.String EXECUTION_POOL_KEY
        The execution pool key
        See Also:
        Constant Field Values
      • GLOBUS_SCHEDULER_KEY

        public static final java.lang.String GLOBUS_SCHEDULER_KEY
        The globus scheduler hints key
        See Also:
        Constant Field Values
      • PFN_HINT_KEY

        public static final java.lang.String PFN_HINT_KEY
        The pfnHint key
        See Also:
        Constant Field Values
      • mNamespace

        protected java.lang.String mNamespace
        The name of the implementing namespace. It should be one of the valid namespaces always.
        See Also:
        Namespace.isNamespaceValid(String)
    • Constructor Detail

      • Hints

        public Hints()
        The default constructor. Note that the map is not allocated memory at this stage. It is done so in the overloaded construct function.
      • Hints

        public Hints​(java.util.Map mp)
        The overloaded constructor.
        Parameters:
        mp - the map containing the profiles to be prepopulated with.
    • Method Detail

      • namespaceName

        public java.lang.String namespaceName()
        Returns the name of the namespace associated with the profile implementations.
        Specified by:
        namespaceName in class Namespace
        Returns:
        the namespace name.
        See Also:
        NAMESPACE_NAME
      • getProfileKeyIterator

        public java.util.Iterator getProfileKeyIterator()
        Provides an iterator to traverse the profiles by their keys.
        Overrides:
        getProfileKeyIterator in class Namespace
        Returns:
        an iterator over the keys to walk the profile list.
      • construct

        public void construct​(java.lang.String key,
                              java.lang.String value)
        Constructs a new element of the format (key=value). It first checks if the map has been initialised or not. If not then allocates memory first.
        Overrides:
        construct in class Namespace
        Parameters:
        key - is the left-hand-side.
        value - is the right hand side.
      • containsKey

        public boolean containsKey​(java.lang.Object key)
        Returns true if the namespace contains a mapping for the specified key. More formally, returns true if and only if this map contains at a mapping for a key k such that (key==null ? k==null : key.equals(k)). (There can be at most one such mapping.) It also returns false if the map does not exist.
        Overrides:
        containsKey in class Namespace
        Parameters:
        key - The key that you want to search for in the namespace.
        Returns:
        boolean
      • checkKey

        public int checkKey​(java.lang.String key,
                            java.lang.String value)
        This checks whether the key passed by the user is valid in the current namespace or not. At present, for this namespace only a limited number of keys have been assigned semantics.
        Specified by:
        checkKey in class Namespace
        Parameters:
        key - (left hand side)
        value - (right hand side)
        Returns:
        Namespace.VALID_KEY
      • checkKeyInNS

        public void checkKeyInNS​(PegasusProperties properties,
                                 java.lang.String pool)
        It puts in the namespace specific information specified in the properties file into the namespace. The name of the pool is also passed, as many of the properties specified in the properties file are on a per pool basis. An empty implementation for the timebeing.
        Specified by:
        checkKeyInNS in class Namespace
        Parameters:
        properties - the PegasusProperties object containing all the properties that the user specified at various places (like .chimerarc, properties file, command line).
        pool - the pool name where the job is scheduled to run.
      • merge

        public void merge​(Namespace profiles)
        Merge the profiles in the namespace in a controlled manner. In case of intersection, the new profile value overrides, the existing profile value.
        Specified by:
        merge in class Namespace
        Parameters:
        profiles - the Namespace object containing the profiles.
      • toCondor

        public java.lang.String toCondor()
        Converts the contents of the map into the string that can be put in the Condor file for printing.
        Specified by:
        toCondor in class Namespace
        Returns:
        String
      • clone

        public java.lang.Object clone()
        Returns a copy of the current namespace object.
        Overrides:
        clone in class Namespace
        Returns:
        the Cloned object