Package com.graphhopper.storage
Class SimpleFSLockFactory
java.lang.Object
com.graphhopper.storage.SimpleFSLockFactory
- All Implemented Interfaces:
LockFactory
Creates a write lock file. Influenced by Lucene code
- Author:
- Peter Karich
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis creates a file for write or read locks depending on the specified writeAccess property.void
forceRemove
(String fileName, boolean writeAccess) Removes the specified lock.void
setLockDir
(File lockDir)
-
Constructor Details
-
SimpleFSLockFactory
public SimpleFSLockFactory() -
SimpleFSLockFactory
-
-
Method Details
-
setLockDir
- Specified by:
setLockDir
in interfaceLockFactory
-
create
Description copied from interface:LockFactory
This creates a file for write or read locks depending on the specified writeAccess property. Important note: even for read locks we need write access to the underlying filesystem in order to avoid writes from other processes.- Specified by:
create
in interfaceLockFactory
-
forceRemove
Description copied from interface:LockFactory
Removes the specified lock. Note: on windows we cannot forcefully remove an unreleased native lock- Specified by:
forceRemove
in interfaceLockFactory
-