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
-
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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
lock
Acquire a lock.- Specified by:
lock
in interfaceCloseableLock
- Throws:
LockException
- in case of problem acquiring the lock
-