Package org.testng.internal
Class KeyAwareAutoCloseableLock
- java.lang.Object
-
- org.testng.internal.KeyAwareAutoCloseableLock
-
public final class KeyAwareAutoCloseableLock extends java.lang.ObjectA simple abstraction overReentrantLockthat can be used when we need to be dealing with a dictionary of lockable objects wherein we traditionally would have used thesynchronizedkeyword.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classKeyAwareAutoCloseableLock.AutoReleasable
-
Constructor Summary
Constructors Constructor Description KeyAwareAutoCloseableLock()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KeyAwareAutoCloseableLock.AutoReleasablelockForObject(java.lang.Object key)
-
-
-
Method Detail
-
lockForObject
public KeyAwareAutoCloseableLock.AutoReleasable lockForObject(java.lang.Object key)
-
-