Class AutoCloseableLock
java.lang.Object
org.testng.internal.AutoCloseableLock
- All Implemented Interfaces:
Closeable, AutoCloseable
A simple abstraction over
ReentrantLock that can be used in conjunction with
try..resources constructs.-
Constructor Details
-
AutoCloseableLock
public AutoCloseableLock()
-
-
Method Details
-
lock
-
isHeldByCurrentThread
public boolean isHeldByCurrentThread() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
equals
-
hashCode
-