Package io.vertx.rxjava3.core.file
Class AsyncFileLock
- java.lang.Object
-
- io.vertx.rxjava3.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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)AsyncFileLockgetDelegate()inthashCode()booleanisShared()io.reactivex.rxjava3.core.Single<Boolean>isValid()LikeisValid()but thehandlerwill be called when the operation completes or if an error occurs.booleanisValidBlocking()LikeisValid()but blocking.static AsyncFileLocknewInstance(AsyncFileLock arg)booleanoverlaps(long position, long size)longposition()io.reactivex.rxjava3.core.Completablerelease()Likerelease()but thehandlerwill be called when the operation completes or if an error occurs.voidreleaseBlocking()Likerelease()but blocking.io.reactivex.rxjava3.core.Single<Boolean>rxIsValid()LikeisValid()but thehandlerwill be called when the operation completes or if an error occurs.io.reactivex.rxjava3.core.CompletablerxRelease()Likerelease()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(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:
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()but blocking.- Returns:
-
isValid
public io.reactivex.rxjava3.core.Single<Boolean> isValid()
LikeisValid()but thehandlerwill be called when the operation completes or if an error occurs.- Returns:
-
rxIsValid
public io.reactivex.rxjava3.core.Single<Boolean> rxIsValid()
LikeisValid()but thehandlerwill be called when the operation completes or if an error occurs.- Returns:
-
releaseBlocking
public void releaseBlocking()
Likerelease()but blocking.
-
release
public io.reactivex.rxjava3.core.Completable release()
Likerelease()but thehandlerwill be called when the operation completes or if an error occurs.- Returns:
-
rxRelease
public io.reactivex.rxjava3.core.Completable rxRelease()
Likerelease()but thehandlerwill be called when the operation completes or if an error occurs.- Returns:
-
newInstance
public static AsyncFileLock newInstance(AsyncFileLock arg)
-
-