Package org.openjdk.jmh.annotations
Enum Scope
- All Implemented Interfaces:
Serializable
,Comparable<Scope>
,java.lang.constant.Constable
State
scope.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
-
Enum Constant Details
-
Benchmark
-
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
andTearDown
methods on this state object would be performed by one of the group threads, and only once perLevel
. No other threads would ever touch the state object.- See Also:
-
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
andTearDown
methods on this state object would be performed by single worker thread exclusively, and only once perLevel
. No other threads would ever touch the state object.
-
-
Constructor Details
-
Scope
private Scope()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-