org.modeshape.jcr.value.binary

## Class FileLocks.WrappedLock

- java.lang.Object
- - org.modeshape.jcr.value.binary.FileLocks.WrappedLock

- All Implemented Interfaces:
    Lock
  Enclosing class:
    FileLocks

      protected static class FileLocks.WrappedLock
      extends Object
      implements Lock

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Lock` | `actualLock`
    `protected FileLocks.LockHolder` | `holder`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `FileLocks.WrappedLock(FileLocks.LockHolder namedLock, Lock lock)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `lock()`
    `FileChannel` | `lockedFileChannel()` Returns the `FileLock.channel()` associated with the file 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`

- - ### Field Detail

    - #### holder

          protected final FileLocks.LockHolder holder

    - #### actualLock

          protected final Lock actualLock

  - ### Constructor Detail

    - #### FileLocks.WrappedLock

          protected FileLocks.WrappedLock(FileLocks.LockHolder namedLock,
                               Lock lock)

  - ### Method Detail

    - #### lock

          public void lock()

      Specified by:
        `lock` in interface `Lock`

    - #### lockInterruptibly

          public void lockInterruptibly()

      Specified by:
        `lockInterruptibly` in interface `Lock`

    - #### newCondition

          public Condition newCondition()

      Specified by:
        `newCondition` in interface `Lock`

    - #### tryLock

          public boolean tryLock()

      Specified by:
        `tryLock` in interface `Lock`

    - #### tryLock

          public boolean tryLock(long time,
                        TimeUnit unit)

      Specified by:
        `tryLock` in interface `Lock`

    - #### unlock

          public void unlock()

      Specified by:
        `unlock` in interface `Lock`

    - #### lockedFileChannel

          public FileChannel lockedFileChannel()

      Returns the `FileLock.channel()` associated with the file lock.
      Returns:
        a `FileChannel` instance.

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.