Class NopLock
- java.lang.Object
-
- org.junit.platform.engine.support.hierarchical.NopLock
-
- All Implemented Interfaces:
java.lang.AutoCloseable,ResourceLock
class NopLock extends java.lang.Object implements ResourceLock
No-opResourceLockimplementation.- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static ResourceLockINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privateNopLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceLockacquire()Acquire this resource lock, potentially blocking.voidrelease()Release this resource lock.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.support.hierarchical.ResourceLock
close
-
-
-
-
Field Detail
-
INSTANCE
static final ResourceLock INSTANCE
-
-
Method Detail
-
acquire
public ResourceLock acquire()
Description copied from interface:ResourceLockAcquire this resource lock, potentially blocking.- Specified by:
acquirein interfaceResourceLock- Returns:
- this lock so it can easily be used in a try-with-resources statement.
-
release
public void release()
Description copied from interface:ResourceLockRelease this resource lock.- Specified by:
releasein interfaceResourceLock
-
-