Class FileLock
java.lang.Object
com.netflix.genie.agent.utils.locks.impl.FileLock
- All Implemented Interfaces:
CloseableLock,Closeable,AutoCloseable
CloseableLock for a file.
- Since:
- 4.0.0
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
FileLock
Create a lock for the provided file.- Parameters:
file- file to be locked- Throws:
LockException- in case there is a problem creating a File CloseableLock
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
lock
Acquire a lock.- Specified by:
lockin interfaceCloseableLock- Throws:
LockException- in case of problem acquiring the lock
-