com.ibm.rational.test.lt.kernel

Interface IDataArea



  • public interface IDataArea
    The IDataArea interface defines functionality for data areas.

    A DataArea is a container for Container attributes. The elements of a DataArea are similar to program variables and are scoped to the owning container.

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static String ENGINE
      The name of the DataArea provided at the engine level.
      static String ENV
      This will set a variable in the environment.
      static String SYSTEM
      This will set a variable in the system properties.
      static String TEST
      The name of the DataArea provided for each test script.
      static String VIRTUALUSER
      The name of the DataArea provided for each virtual user.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean containsKey(Object key)
      Returns true if there is a mapping for the specified key.
      boolean containsValue(Object value)
      Returns true if there is an entry for this value.
      Object get(Object key)
      Retrieves an object from the current DataArea.
      String getName()
      Returns the name of the specified DataArea.
      boolean isCacheable()
      Returns the value of the dataArea's cacheable flag.
      void lock()
      Locks the entire DataArea.
      void lock(Object key)
      Locks the specified key.
      Object put(Object key, Object value)
      Adds an object to the DataArea.
      Object remove(Object key)
      Removes the object with the given key from the DataArea.
      void setCacheable(boolean flag)
      Marks the dataArea as cacheable (or not).
    • Field Detail

      • ENGINE

        static final String ENGINE
        The name of the DataArea provided at the engine level.
      • VIRTUALUSER

        static final String VIRTUALUSER
        The name of the DataArea provided for each virtual user.
      • TEST

        static final String TEST
        The name of the DataArea provided for each test script.
      • ENV

        static final String ENV
        This will set a variable in the environment. It is NOT a suitable choice if running in a multi-user environment
      • SYSTEM

        static final String SYSTEM
        This will set a variable in the system properties. It is NOT a suitable choice if running in a multi-user environment
    • Method Detail

      • get

        Object get(Object key)
        Retrieves an object from the current DataArea.

        Returns the object value to which the key is currently mapped or null if there is no mapping for this key. Note that it is possible for the key to map to a null value. Use the containsKey method to distinguish between these two cases.

        Parameters:
        key - Object
        Returns:
        Object The Object that corresponds to the specified key.
      • put

        Object put(Object key,
                 Object value)
        Adds an object to the DataArea.

        Associates the specified value with the specified key in this map. If the map previously contained a mapping for this key, the old value is replaced.

        Parameters:
        key - Object to associate with value.
        value - Object to be associated with key.
        Returns:
        Object The object that the previous value associated with the specified key, or null if there was no mapping for the key. A null return can also indicate that the HashMap previously associated null with the specified key.
      • containsKey

        boolean containsKey(Object key)
        Returns true if there is a mapping for the specified key.
        Parameters:
        key - Object
        Returns:
        boolean true if there is a mapping for the specified key. false if there is no mapping for this key.
      • containsValue

        boolean containsValue(Object value)
        Returns true if there is an entry for this value.
        Parameters:
        value - Object
        Returns:
        boolean true if the DataArea contains the specified value. false if this value is not in the DataArea.
      • getName

        String getName()
        Returns the name of the specified DataArea.
        Returns:
        String DataArea name.
      • remove

        Object remove(Object key)
        Removes the object with the given key from the DataArea.
        Parameters:
        key -
        Returns:
        The object is removed.
      • lock

        void lock()
        Locks the entire DataArea.

        Causes subsequent put() and remove() calls to fail for this key.

      • lock

        void lock(Object key)
        Locks the specified key.

        Causes subsequent put() and remove() calls to fail for this key.

        Parameters:
        key -
      • setCacheable

        void setCacheable(boolean flag)
        Marks the dataArea as cacheable (or not).

        If a dataArea is cacheable then KAction.findDataArea() will only really search for a given dataArea once and will cache the result for future efficiency.<\p>

        Parameters:
        flag -
      • isCacheable

        boolean isCacheable()
        Returns the value of the dataArea's cacheable flag.
        Returns:
        boolean
IBM Rational Performance Tester TES

© Copyright IBM Corp. 2013. All rights reserved.