Package org.droolsassert.util
Class ReentrantFileLock.ReentrantFileLockFactory
- java.lang.Object
-
- org.droolsassert.util.ReentrantFileLock.ReentrantFileLockFactory
-
- Enclosing class:
- ReentrantFileLock
public static class ReentrantFileLock.ReentrantFileLockFactory extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReentrantFileLocknewLock(int id)Creates new lock for the given id.
Id will be used to uniquely identify the lock (position) in the file.ReentrantFileLocknewLock(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.
-
-
-
Method Detail
-
newLock
public 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.- See Also:
FileChannel.lock(long, long, boolean)
-
newLock
public ReentrantFileLock newLock(int id)
Creates new lock for the given id.
Id will be used to uniquely identify the lock (position) in the file.- See Also:
FileChannel.lock(long, long, boolean)
-
-