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
Lock represents a shared resource.
Each resource is identified by a key. In addition,
the access mode allows one to specify whether
a test class or test method requires READ_WRITE or READ access to the resource.
- Since:
- 5.12
- See Also:
- API Note:
getKey()andgetAccessMode()have the same semantics asResourceLock.value()andResourceLock.mode()respectively.
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a newLockwithResourceAccessMode.READ_WRITE.Lock(String key, ResourceAccessMode accessMode) Create a newLock. -
Method Summary
-
Constructor Details
-
Lock
Create a newLockwithResourceAccessMode.READ_WRITE.- Parameters:
key- the identifier of the resource; nevernullor blank- See Also:
-
Lock
Create a newLock.- Parameters:
key- the identifier of the resource; nevernullor blankaccessMode- the lock mode to use to synchronize access to the resource; nevernull- See Also:
-
-
Method Details