Package io.vertx.reactivex.core.file
Class AsyncFileLock
- java.lang.Object
-
- io.vertx.reactivex.core.file.AsyncFileLock
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<AsyncFileLock>__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description AsyncFileLock(io.vertx.core.file.AsyncFileLock delegate)AsyncFileLock(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)io.vertx.core.file.AsyncFileLockgetDelegate()inthashCode()booleanisShared()voidisValid()LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but thehandlerwill be called when the operation completes or if an error occurs.voidisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but thehandlerwill be called when the operation completes or if an error occurs.booleanisValidBlocking()LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but blocking.static AsyncFileLocknewInstance(io.vertx.core.file.AsyncFileLock arg)booleanoverlaps(long position, long size)longposition()voidrelease()Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)but thehandlerwill be called when the operation completes or if an error occurs.voidrelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)but thehandlerwill be called when the operation completes or if an error occurs.voidreleaseBlocking()Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)but blocking.io.reactivex.Single<Boolean>rxIsValid()LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but thehandlerwill be called when the operation completes or if an error occurs.io.reactivex.CompletablerxRelease()Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)but thehandlerwill be called when the operation completes or if an error occurs.longsize()StringtoString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<AsyncFileLock> __TYPE_ARG
-
-
Constructor Detail
-
AsyncFileLock
public AsyncFileLock(io.vertx.core.file.AsyncFileLock delegate)
-
AsyncFileLock
public AsyncFileLock(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.core.file.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:
trueif this lock is shared, otherwisefalse
-
overlaps
public boolean overlaps(long position, long size)- Parameters:
position-size-- Returns:
trueif this lock overlaps with the range described bypositionandsize, otherwisefalse
-
isValidBlocking
public boolean isValidBlocking()
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but blocking.- Returns:
-
isValid
public void isValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<Boolean>> handler)
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)but thehandlerwill 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 thehandlerwill 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 thehandlerwill 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(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)
Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)but thehandlerwill 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 thehandlerwill 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 thehandlerwill be called when the operation completes or if an error occurs.- Returns:
-
newInstance
public static AsyncFileLock newInstance(io.vertx.core.file.AsyncFileLock arg)
-
-