|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.knime.core.util.FileLocker
public class FileLocker
This class can be used to get a lock on the specified file. The lock can be aquired and released. If it is not explicitly released, it will be released as soon as the JVM is terminated.
| Constructor Summary | |
|---|---|
FileLocker(File lockFile)
Creates a FileLocker on the given file. |
|
| Method Summary | |
|---|---|
boolean |
lock()
Tries to auquire the lock on the given File. |
void |
release()
Releases a previously aquired lock on the specified file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileLocker(File lockFile)
FileLocker on the given file. Creating the locker does
not mean, that the file is also locked. For this, use the methods lock
and release.
lockFile - the file for which to aquire and release locks| Method Detail |
|---|
public boolean lock()
throws IOException
File.
IOException - in case there is something wrong with the io actionspublic void release()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||