Class AsyncFileLock


  • public class AsyncFileLock
    extends Object
    A lock on a region of an AsyncFile.

    NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.

    • Field Detail

      • __TYPE_ARG

        public static final io.vertx.lang.rx.TypeArg<AsyncFileLock> __TYPE_ARG
    • Constructor Detail

      • AsyncFileLock

        public AsyncFileLock​(AsyncFileLock delegate)
      • AsyncFileLock

        public AsyncFileLock​(Object delegate)
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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, otherwise false
      • overlaps

        public boolean overlaps​(long position,
                                long size)
        Parameters:
        position -
        size -
        Returns:
        true if this lock overlaps with the range described by position and size, otherwise false
      • isValidBlocking

        public boolean isValidBlocking()
        Like isValid() but blocking.
        Returns:
      • isValid

        public Single<Boolean> isValid()
        A lock remains valid until it is released or the file corresponding AsyncFile is closed.
        Returns:
      • rxIsValid

        public Single<Boolean> rxIsValid()
        A lock remains valid until it is released or the file corresponding AsyncFile is closed.
        Returns:
      • releaseBlocking

        public void releaseBlocking()
        Like release() but blocking.
      • release

        public Completable release()
        Releases this lock;
        Returns:
      • rxRelease

        public Completable rxRelease()
        Releases this lock;
        Returns: