Package io.vertx.rxjava3.core.file
Class AsyncFileLock
- java.lang.Object
-
- io.vertx.rxjava3.core.file.AsyncFileLock
-
- All Implemented Interfaces:
RxDelegate
public class AsyncFileLock extends Object implements RxDelegate
-
-
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 boolean
equals(Object o)
AsyncFileLock
getDelegate()
int
hashCode()
boolean
isShared()
io.reactivex.rxjava3.core.Single<Boolean>
isValid()
LikeisValid()
but thehandler
will be called when the operation completes or if an error occurs.boolean
isValidBlocking()
LikeisValid()
but blocking.static AsyncFileLock
newInstance(AsyncFileLock arg)
boolean
overlaps(long position, long size)
long
position()
io.reactivex.rxjava3.core.Completable
release()
Likerelease()
but thehandler
will be called when the operation completes or if an error occurs.void
releaseBlocking()
Likerelease()
but blocking.io.reactivex.rxjava3.core.Single<Boolean>
rxIsValid()
LikeisValid()
but thehandler
will be called when the operation completes or if an error occurs.io.reactivex.rxjava3.core.Completable
rxRelease()
Likerelease()
but thehandler
will be called when the operation completes or if an error occurs.long
size()
String
toString()
-
-
-
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()
- Specified by:
getDelegate
in interfaceRxDelegate
-
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()
but blocking.- Returns:
-
isValid
public io.reactivex.rxjava3.core.Single<Boolean> isValid()
LikeisValid()
but thehandler
will be called when the operation completes or if an error occurs.- Returns:
-
rxIsValid
public io.reactivex.rxjava3.core.Single<Boolean> rxIsValid()
LikeisValid()
but thehandler
will 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 thehandler
will be called when the operation completes or if an error occurs.- Returns:
-
rxRelease
public io.reactivex.rxjava3.core.Completable rxRelease()
Likerelease()
but thehandler
will be called when the operation completes or if an error occurs.- Returns:
-
newInstance
public static AsyncFileLock newInstance(AsyncFileLock arg)
-
-