public static class ReentrantFileLock.ReentrantFileLockFactory extends Object
| Modifier and Type | Method and Description |
|---|---|
ReentrantFileLock |
newLock(int id)
Creates new lock for the given id.
Id will be used to uniquely identify the lock (position) in the file. |
ReentrantFileLock |
newLock(String name)
Creates new lock for the given name.
Hash code of the name will be used to compute lock id (position) in the file. |
public ReentrantFileLock newLock(String name)
FileChannel.lock(long, long, boolean)public ReentrantFileLock newLock(int id)
FileChannel.lock(long, long, boolean)Copyright © 2021. All rights reserved.