FileBasedLockStrategy.CreateFileLocker
Date: 2014-12-13

org.apache.ivy.plugins.lock

## Class FileBasedLockStrategy.CreateFileLocker

- java.lang.Object
- - org.apache.ivy.plugins.lock.FileBasedLockStrategy.CreateFileLocker

- All Implemented Interfaces:
    FileBasedLockStrategy.FileLocker
  Enclosing class:
    FileBasedLockStrategy

      public static class FileBasedLockStrategy.CreateFileLocker
      extends java.lang.Object
      implements FileBasedLockStrategy.FileLocker

  "locks" a file by creating it if it doesn't exist, relying on the `File.createNewFile()` atomicity.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileBasedLockStrategy.CreateFileLocker(boolean debugLocking)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `tryLock(java.io.File file)`
    `void` | `unlock(java.io.File file)`

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

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

- - ### Constructor Detail

    - #### FileBasedLockStrategy.CreateFileLocker

          public FileBasedLockStrategy.CreateFileLocker(boolean debugLocking)

  - ### Method Detail

    - #### tryLock

          public boolean tryLock(java.io.File file)

      Specified by:
        `tryLock` in interface `FileBasedLockStrategy.FileLocker`

    - #### unlock

          public void unlock(java.io.File file)

      Specified by:
        `unlock` in interface `FileBasedLockStrategy.FileLocker`