Class LockableFile.NioFileLock
java.lang.Object
net.adoptopenjdk.icedteaweb.lockingfile.LockableFile.NioFileLock
- All Implemented Interfaces:
LockableFile.InterProcessLock
- Enclosing class:
LockableFile
This is the recommended way to lock a file system wide (across multiple processes).
Unfortunately this causes problems during unlocking in Windows. https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4715154
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
randomAccessFile
-
fileChannel
-
fileLock
-
-
Constructor Details
-
NioFileLock
private NioFileLock()
-
-
Method Details
-
lock
- Specified by:
lockin interfaceLockableFile.InterProcessLock- Throws:
IOException
-
tryLock
- Specified by:
tryLockin interfaceLockableFile.InterProcessLock- Throws:
IOException
-
unlock
- Specified by:
unlockin interfaceLockableFile.InterProcessLock- Throws:
IOException
-