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-opResourceLock
implementation.- Since:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static ResourceLock
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
NopLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceLock
acquire()
Acquire this resource lock, potentially blocking.void
release()
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:ResourceLock
Acquire this resource lock, potentially blocking.- Specified by:
acquire
in interfaceResourceLock
- Returns:
- this lock so it can easily be used in a try-with-resources statement.
-
release
public void release()
Description copied from interface:ResourceLock
Release this resource lock.- Specified by:
release
in interfaceResourceLock
-
-