|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public static interface FileLockManager.Lock
This lock object adds the ability to directly access the contents of the locked file.
| Method Summary | |
|---|---|
File |
getFile()
Get the file this Lock was obtained for. |
RandomAccessFile |
getRandomAccessFile()
Gets the random access file used to read/write the contents of the locked file. |
boolean |
isShared()
Tells whether the lock is shared or exclusive. |
void |
lock()
Lock the file this Lock was obtained for. |
void |
unlock()
Unlock the file this Lock was obtained for. |
| Method Detail |
|---|
RandomAccessFile getRandomAccessFile()
throws IOException
null if the lock isn't acquired.
IOExceptionboolean isShared()
true if the lock is shared, false if the lock is exclusive.
void lock()
throws IOException
Multiple lock() invocations on the same or other lock objects using the same (canonical) file as
target are possible and non-blocking from the same caller thread.
IOException - if an error occurs while locking the file.
void unlock()
throws IOException
IOException - if an error occurs while locking the file.File getFile()
null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||