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.java.util.List<ExclusiveResource>getResources(){@return the exclusive resources this lock represents}booleanisExclusive(){@return whether this lock requires exclusiveness}voidrelease()Release this resource lock.java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.support.hierarchical.ResourceLock
close, isCompatible
-
-
-
-
Field Detail
-
INSTANCE
static final ResourceLock INSTANCE
-
-
Method Detail
-
getResources
public java.util.List<ExclusiveResource> getResources()
Description copied from interface:ResourceLock{@return the exclusive resources this lock represents}- Specified by:
getResourcesin interfaceResourceLock
-
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
-
isExclusive
public boolean isExclusive()
Description copied from interface:ResourceLock{@return whether this lock requires exclusiveness}- Specified by:
isExclusivein interfaceResourceLock
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-