public enum Scope extends Enum<Scope>
State
scope.Enum Constant and Description |
---|
Benchmark
Benchmark state scope.
|
Group
Group state scope.
|
Thread
Thread state scope.
|
Modifier and Type | Method and Description |
---|---|
static Scope |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Scope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Scope Benchmark
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.
Group
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.
public static Scope[] values()
for (Scope c : Scope.values()) System.out.println(c);
public static Scope valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2012–2020 Oracle. All rights reserved.