Package io.vertx.reactivex.core.file
Class AsyncFileLock
- java.lang.Object
-
- io.vertx.reactivex.core.file.AsyncFileLock
-
public class AsyncFileLock extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<AsyncFileLock>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AsyncFileLock(AsyncFileLock delegate)
AsyncFileLock(Object delegate)
-
Method Summary
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AsyncFileLock> __TYPE_ARG
-
-
Constructor Detail
-
AsyncFileLock
public AsyncFileLock(AsyncFileLock delegate)
-
AsyncFileLock
public AsyncFileLock(Object delegate)
-
-
Method Detail
-
getDelegate
public AsyncFileLock getDelegate()
-
position
public long position()
- Returns:
- the position of the first byte of the locked region
-
size
public long size()
- Returns:
- the size in bytes of the locked region
-
isShared
public boolean isShared()
- Returns:
true
if this lock is shared, otherwisefalse
-
overlaps
public boolean overlaps(long position, long size)
- Parameters:
position
-size
-- Returns:
true
if this lock overlaps with the range described byposition
andsize
, otherwisefalse
-
isValidBlocking
public boolean isValidBlocking()
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)
but blocking.- Returns:
-
isValid
public void isValid(Handler<AsyncResult<Boolean>> handler)
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)
but thehandler
will be called when the operation completes or if an error occurs.- Parameters:
handler
-
-
isValid
public void isValid()
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)
but thehandler
will be called when the operation completes or if an error occurs.
-
rxIsValid
public io.reactivex.Single<Boolean> rxIsValid()
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)
but thehandler
will be called when the operation completes or if an error occurs.- Returns:
-
releaseBlocking
public void releaseBlocking()
Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
but blocking.
-
release
public void release(Handler<AsyncResult<Void>> handler)
Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
but thehandler
will be called when the operation completes or if an error occurs.- Parameters:
handler
-
-
release
public void release()
Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
but thehandler
will be called when the operation completes or if an error occurs.
-
rxRelease
public io.reactivex.Completable rxRelease()
Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
but thehandler
will be called when the operation completes or if an error occurs.- Returns:
-
newInstance
public static AsyncFileLock newInstance(AsyncFileLock arg)
-
-