Class AsyncFileLock
java.lang.Object
io.vertx.reactivex.core.file.AsyncFileLock
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()booleanisShared()isValid()A lock remains valid until it is released or the file correspondingAsyncFileis closed.booleanLikeisValid()but blocking.static AsyncFileLocknewInstance(AsyncFileLock arg) booleanoverlaps(long position, long size) longposition()release()Releases this lock;voidLikerelease()but blocking.A lock remains valid until it is released or the file correspondingAsyncFileis closed.Releases this lock;longsize()toString()
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
AsyncFileLock
-
AsyncFileLock
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
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
-
overlaps
public boolean overlaps(long position, long size) - Parameters:
position-size-- Returns:
trueif this lock overlaps with the range described bypositionandsize, otherwisefalse
-
isValidBlocking
-
isValid
-
rxIsValid
-
releaseBlocking
public void releaseBlocking()Likerelease()but blocking. -
release
-
rxRelease
-
newInstance
-