|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.util.FileBasedLock
public class FileBasedLock
This class provides a mechanism to use simple files as locks to prevent multiple threads or processes from updating common files.
Constructor Summary | |
---|---|
FileBasedLock(java.io.File lockFile)
Creates a new instance. |
Method Summary | |
---|---|
void |
lock()
Obtain an exclusive lock. |
void |
release()
Performs resource cleanup tasks such as closing files, or database connections. |
void |
unlock()
Release the lock. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileBasedLock(java.io.File lockFile)
lockFile
- The file to use for locking.Method Detail |
---|
public void lock()
public void unlock()
public void release()
release
in interface Releasable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |