Package spock.lang
Annotation Type ResourceLock
@Beta @Retention(RUNTIME) @Target({TYPE,METHOD}) @Repeatable(Container.class) public @interface ResourceLock
Allows to control access to a shared resource.
If applied on class-level, the lock will be on the class,
covering shared fields and
setupSpec
/cleanupSpec
.
This will also cause all features to run on the same thread
as the Specification.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
ResourceLock.Container
-
Required Element Summary
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description org.spockframework.runtime.model.parallel.ResourceAccessMode
mode
Controls the access mode of the resource.
-
Element Details
-
value
String valueThe key identifying the resource.- Returns:
- the key
- See Also:
for a list of standard resources
-
-
-
mode
org.spockframework.runtime.model.parallel.ResourceAccessMode modeControls the access mode of the resource.- Returns:
- mode to use
- Default:
- READ_WRITE
-