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