Enum Scope

    • Enum Constant Detail

      • Benchmark

        public static final Scope Benchmark

        Benchmark state scope.

        With benchmark scope, all instances of the same type will be shared across all worker threads.

        Setup and TearDown methods on this state object would be performed by one of the worker threads, and only once per Level. No other threads would ever touch the state object.

      • Group

        public static final Scope Group

        Group state scope.

        With group scope, all instances of the same type will be shared across all threads within the same group. Each thread group will be supplied with its own state object.

        Setup and TearDown methods on this state object would be performed by one of the group threads, and only once per Level. No other threads would ever touch the state object.

        See Also:
        Group
      • Thread

        public static final Scope Thread

        Thread state scope.

        With thread scope, all instances of the same type are distinct, even if multiple state objects are injected in the same benchmark

        Setup and TearDown methods on this state object would be performed by single worker thread exclusively, and only once per Level. No other threads would ever touch the state object.

    • Method Detail

      • values

        public static Scope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Scope c : Scope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Scope valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null