Package com.strobel.concurrent
Class StripedLock<T>
- java.lang.Object
-
- com.strobel.concurrent.StripedLock<T>
-
- Direct Known Subclasses:
StripedReentrantLock
public abstract class StripedLock<T> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int_lockAllocationCounterprivate static intLOCK_COUNTprotected T[]locks
-
Constructor Summary
Constructors Modifier Constructor Description protectedStripedLock(java.lang.Class<T> lockType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TallocateLock()intallocateLockIndex()protected abstract TcreateLock()abstract voidlock(int index)abstract voidunlock(int index)
-
-
-
Field Detail
-
LOCK_COUNT
private static final int LOCK_COUNT
- See Also:
- Constant Field Values
-
locks
protected final T[] locks
-
_lockAllocationCounter
private int _lockAllocationCounter
-
-
Constructor Detail
-
StripedLock
protected StripedLock(java.lang.Class<T> lockType)
-
-