org.apache.lucene.store

## Class FSLockFactory

- java.lang.Object
- - org.apache.lucene.store.LockFactory
  - - org.apache.lucene.store.FSLockFactory

- Direct Known Subclasses:
    NativeFSLockFactory, SimpleFSLockFactory

      public abstract class FSLockFactory
      extends LockFactory

  Base class for file system based locking implementation.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.io.File` | `lockDir` Directory for the lock files.

    - ### Fields inherited from class org.apache.lucene.store.LockFactory

      `lockPrefix`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FSLockFactory()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.File` | `getLockDir()` Retrieve the lock directory.
    `protected void` | `setLockDir(java.io.File lockDir)` Set the lock directory.

    - ### Methods inherited from class org.apache.lucene.store.LockFactory

      `clearLock, getLockPrefix, makeLock, setLockPrefix`

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

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

- - ### Field Detail

    - #### lockDir

          protected java.io.File lockDir

      Directory for the lock files.

  - ### Constructor Detail

    - #### FSLockFactory

          public FSLockFactory()

  - ### Method Detail

    - #### setLockDir

          protected final void setLockDir(java.io.File lockDir)

      Set the lock directory. This method can be only called once to initialize the lock directory. It is used by `FSDirectory` to set the lock directory to itsself. Subclasses can also use this method to set the directory in the constructor.

    - #### getLockDir

          public java.io.File getLockDir()

      Retrieve the lock directory.

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.