public interface AsyncFileLock
AsyncFile
.Modifier and Type | Method and Description |
---|---|
boolean |
isShared() |
Future<Boolean> |
isValid()
A lock remains valid until it is released or the file corresponding
AsyncFile is closed. |
void |
isValid(Handler<AsyncResult<Boolean>> handler)
Like
isValid() but the handler will be called when the operation completes or if an error occurs. |
boolean |
isValidBlocking()
Like
isValid() but blocking. |
boolean |
overlaps(long position,
long size) |
long |
position() |
Future<Void> |
release()
Releases this lock;
|
void |
release(Handler<AsyncResult<Void>> handler)
Like
release() but the handler will be called when the operation completes or if an error occurs. |
void |
releaseBlocking()
Like
release() but blocking. |
long |
size() |
long position()
long size()
boolean isShared()
true
if this lock is shared, otherwise false
boolean overlaps(long position, long size)
true
if this lock overlaps with the range described by position
and size
, otherwise false
boolean isValidBlocking()
isValid()
but blocking.FileSystemException
- if an error occursFuture<Boolean> isValid()
AsyncFile
is closed.void isValid(Handler<AsyncResult<Boolean>> handler)
isValid()
but the handler
will be called when the operation completes or if an error occurs.void releaseBlocking()
release()
but blocking.FileSystemException
- if an error occursvoid release(Handler<AsyncResult<Void>> handler)
release()
but the handler
will be called when the operation completes or if an error occurs.Copyright © 2024 Eclipse. All rights reserved.