|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.rgw.io.LockFile
public class LockFile
A class that creates and detects lockfile to provide cooperative detection od running instances of an applicatiion (or for other purposes)
| Constructor Summary | |
|---|---|
LockFile(java.io.File dir,
java.lang.String basename,
int maxNum,
int timeoutSeconds)
Create an instance of a LockFile class. |
|
| Method Summary | |
|---|---|
boolean |
existsLock()
Check if at least one lockfile with the given pattern exists |
int |
lock()
create a lockfile with the parameters as given to the constructor. |
boolean |
updateLock(int n)
Refresh the lock i.e. extend its validity time by the original timeout once again. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockFile(java.io.File dir,
java.lang.String basename,
int maxNum,
int timeoutSeconds)
dir - the dir where the lockfile(s) should be createdbasename - the basename for the filesmaxNum - maximum number of instances of this lock that may be aquired simultaneouslytimeoutSeconds - after what time will a lock treaded as invalid| Method Detail |
|---|
public int lock()
throws java.io.IOException
java.io.IOException - id something went wrongpublic boolean updateLock(int n)
n - number of the lockfile (as received by the lock() call)
public boolean existsLock()
throws java.io.IOException
java.io.IOException
|
Elexis: Das führende OpenSource-Arztpraxisprogamm im deutschsprachigen Raum Java doc für Elexis version 2.1.7.dev vom 01.09.2013 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||