Package io.vertx.rxjava.core.file
Class AsyncFileLock
- java.lang.Object
-
- io.vertx.rxjava.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 boolean
equals(Object o)
io.vertx.core.file.AsyncFileLock
getDelegate()
int
hashCode()
boolean
isShared()
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.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 thehandler
will be called when the operation completes or if an error occurs.boolean
isValidBlocking()
LikeisValid(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Boolean>>)
but blocking.static AsyncFileLock
newInstance(io.vertx.core.file.AsyncFileLock arg)
boolean
overlaps(long position, long size)
long
position()
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.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 thehandler
will be called when the operation completes or if an error occurs.void
releaseBlocking()
Likerelease(io.vertx.core.Handler<io.vertx.core.AsyncResult<java.lang.Void>>)
but blocking.rx.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.rx.Single<Void>
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.long
size()
String
toString()
-
-
-
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:
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(io.vertx.core.Handler<io.vertx.core.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 rx.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(io.vertx.core.Handler<io.vertx.core.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 rx.Single<Void> 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(io.vertx.core.file.AsyncFileLock arg)
-
-