Package spock.lang

Annotation Type ResourceLock

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.
See Also:
Isolated, Execution
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static interface  ResourceLock.Container  
  • Required Element Summary

    Required Elements
    Modifier and Type Required Element Description
    String value
    The key identifying the resource.
  • 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 value
      The key identifying the resource.
      the key
      See Also:
      for a list of standard resources
    • mode

      org.spockframework.runtime.model.parallel.ResourceAccessMode mode
      Controls the access mode of the resource.
      mode to use