Class FileLockFactory

java.lang.Object
com.netflix.genie.agent.utils.locks.impl.FileLockFactory

public class FileLockFactory extends Object
Factory for creating locks implementing CloseableLock.
Since:
4.0.0
  • Constructor Details

    • FileLockFactory

      public FileLockFactory()
  • Method Details

    • getLock

      public CloseableLock getLock(File file) throws LockException
      Get a lock locking the provided File object.
      Parameters:
      file - file to be locked
      Returns:
      a lock locking the file
      Throws:
      LockException - in case of a problem getting a lock for the file