com.thinkaurelius.titan.diskstorage.util

## Class NoLock

- java.lang.Object
- - com.thinkaurelius.titan.diskstorage.util.NoLock

- All Implemented Interfaces:
    Lock

      public class NoLock
      extends Object
      implements Lock

  Implementation of a lock that has no effect, i.e. does not actually lock anything.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static Lock` | `INSTANCE`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Lock` | `getLock()`
    `void` | `lock()`
    `void` | `lockInterruptibly()`
    `Condition` | `newCondition()`
    `boolean` | `tryLock()`
    `boolean` | `tryLock(long l, TimeUnit timeUnit)`
    `void` | `unlock()`

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

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

- - ### Field Detail

    - #### INSTANCE

          public static final Lock INSTANCE

  - ### Method Detail

    - #### getLock

          public static final Lock getLock()

    - #### 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 l,
                        TimeUnit timeUnit)
                          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`

Copyright © 2012–2014. All rights reserved.