Class StripedLock<T>

  • Direct Known Subclasses:
    StripedReentrantLock

    public abstract class StripedLock<T>
    extends java.lang.Object
    • Field Detail

      • locks

        protected final T[] locks
      • _lockAllocationCounter

        private int _lockAllocationCounter
    • Constructor Detail

      • StripedLock

        protected StripedLock​(java.lang.Class<T> lockType)
    • Method Detail

      • allocateLock

        @NotNull
        public T allocateLock()
      • allocateLockIndex

        public int allocateLockIndex()
      • createLock

        @NotNull
        protected abstract T createLock()
      • lock

        public abstract void lock​(int index)
      • unlock

        public abstract void unlock​(int index)