@API(status=EXPERIMENTAL,
since="1.3")
public interface ResourceLock
extends java.lang.AutoCloseable
HierarchicalTestExecutorService.TestTask.getResourceLock()
Modifier and Type | Method and Description |
---|---|
ResourceLock |
acquire()
Acquire this resource lock, potentially blocking.
|
default void |
close() |
void |
release()
Release this resource lock.
|
ResourceLock acquire() throws java.lang.InterruptedException
java.lang.InterruptedException
- if the calling thread is interrupted
while waiting to acquire this lockvoid release()
default void close()
close
in interface java.lang.AutoCloseable