Package com.strobel.concurrent
Class StripedReentrantLock
-
Field Summary
FieldsFields inherited from class com.strobel.concurrent.StripedLock
locks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ReentrantLock
static StripedReentrantLock
instance()
final void
lock
(int index) final void
unlock
(int index) Methods inherited from class com.strobel.concurrent.StripedLock
allocateLock, allocateLockIndex
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
StripedReentrantLock
public StripedReentrantLock()
-
-
Method Details
-
instance
-
createLock
- Specified by:
createLock
in classStripedLock<ReentrantLock>
-
lock
public final void lock(int index) - Specified by:
lock
in classStripedLock<ReentrantLock>
-
unlock
public final void unlock(int index) - Specified by:
unlock
in classStripedLock<ReentrantLock>
-