Interface LockFactory

All Known Implementing Classes:
NativeFSLockFactory, SimpleFSLockFactory

public interface LockFactory
Author:
Peter Karich
  • Method Summary

    Modifier and Type
    Method
    Description
    create(String fileName, boolean writeAccess)
    This creates a file for write or read locks depending on the specified writeAccess property.
    void
    forceRemove(String fileName, boolean writeAccess)
    Removes the specified lock.
    void
    setLockDir(File lockDir)
     
  • Method Details

    • setLockDir

      void setLockDir(File lockDir)
    • create

      GHLock create(String fileName, boolean writeAccess)
      This creates a file for write or read locks depending on the specified writeAccess property. Important note: even for read locks we need write access to the underlying filesystem in order to avoid writes from other processes.
    • forceRemove

      void forceRemove(String fileName, boolean writeAccess)
      Removes the specified lock. Note: on windows we cannot forcefully remove an unreleased native lock