Module org.junit.jupiter.api
Package org.junit.jupiter.api.parallel
Class ResourceLocksProvider.Lock
java.lang.Object
org.junit.jupiter.api.parallel.ResourceLocksProvider.Lock
- Enclosing interface:
ResourceLocksProvider
ResourceLocksProvider.Lock
represents a shared resource.
Each resource is identified by a key
.
In addition, the accessMode
allows to specify
whether a test class or test
method requires READ_WRITE
or only READ
access to the resource.
- Since:
- 5.12
- See Also:
- API Note:
key
andaccessMode
have the same semantics asResourceLock.value()
andResourceLock.mode()
respectively.
-
Constructor Summary
ConstructorDescriptionCreate a newLock
withaccessMode = READ_WRITE
.Lock
(String key, ResourceAccessMode accessMode) Create a newLock
. -
Method Summary
-
Constructor Details
-
Lock
Create a newLock
withaccessMode = READ_WRITE
.- Parameters:
key
- the identifier of the resource; nevernull
or blank- See Also:
-
Lock
Create a newLock
.- Parameters:
key
- the identifier of the resource; nevernull
or blankaccessMode
- the lock mode to use to synchronize access to the resource; nevernull
- See Also:
-
-
Method Details