com.hammurapi.store

## Class AbstractTrackingLock

- java.lang.Object
- - com.hammurapi.store.AbstractTrackingLock

- All Implemented Interfaces:
    TrackingLock, Lock
  Direct Known Subclasses:
    LocalTrackingLock

      public abstract class AbstractTrackingLock
      extends Object
      implements TrackingLock

  This class tracks number of locks acquired by current thread.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTrackingLock(Lock master)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected abstract void` | `decCounter()`
    `protected abstract int` | `getCounter()`
    `protected abstract void` | `incCounter()`
    `boolean` | `isLocked()`
    `void` | `lock()`
    `void` | `lockInterruptibly()`
    `Condition` | `newCondition()`
    `boolean` | `tryLock()`
    `boolean` | `tryLock(long time, TimeUnit unit)`
    `void` | `unlock()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AbstractTrackingLock

          public AbstractTrackingLock(Lock master)

  - ### Method Detail

    - #### incCounter

          protected abstract void incCounter()

    - #### decCounter

          protected abstract void decCounter()

    - #### getCounter

          protected abstract int getCounter()

    - #### isLocked

          public boolean isLocked()

      Specified by:
        `isLocked` in interface `TrackingLock`

    - #### lock

          public void lock()

      Specified by:
        `lock` in interface `Lock`

    - #### lockInterruptibly

          public void lockInterruptibly()
                                 throws InterruptedException

      Specified by:
        `lockInterruptibly` in interface `Lock`
      Throws:
        `InterruptedException`

    - #### tryLock

          public boolean tryLock()

      Specified by:
        `tryLock` in interface `Lock`

    - #### tryLock

          public boolean tryLock(long time,
                        TimeUnit unit)
                          throws InterruptedException

      Specified by:
        `tryLock` in interface `Lock`
      Throws:
        `InterruptedException`

    - #### unlock

          public void unlock()

      Specified by:
        `unlock` in interface `Lock`

    - #### newCondition

          public Condition newCondition()

      Specified by:
        `newCondition` in interface `Lock`