|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.ObjectLocker
File locking.
| Nested Class Summary | |
static interface |
Locker.LockerCB
|
| Constructor Summary | |
Locker(java.io.File lockfile)
Constructor. |
|
| Method Summary | |
java.lang.String |
getError()
Return latest error code. |
static void |
main(java.lang.String[] args)
Test method. |
void |
release()
Release the lockfile. |
boolean |
take()
Take the lockfile, blocking version. |
boolean |
take(int retries,
int secondsToWait,
Locker.LockerCB cb)
Take the lockfile, non-blocking version. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Locker(java.io.File lockfile)
| Method Detail |
public java.lang.String getError()
public boolean take()
public boolean take(int retries,
int secondsToWait,
Locker.LockerCB cb)
retries - - number of times to retrysecondsToWait - - number of seconds to sleep between retriescb - - callback to user after each non-exceptional failure
public void release()
public static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||