Class AsyncFileLock

java.lang.Object
io.vertx.reactivex.core.file.AsyncFileLock
All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate

public class AsyncFileLock extends Object implements io.vertx.lang.rx.RxDelegate
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 Details

    • __TYPE_ARG

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

    • AsyncFileLock

      public AsyncFileLock(AsyncFileLock delegate)
    • AsyncFileLock

      public AsyncFileLock(Object delegate)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getDelegate

      public AsyncFileLock getDelegate()
      Specified by:
      getDelegate in interface io.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
    • 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 Future<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 Future<Void> release()
      Releases this lock;
      Returns:
    • rxRelease

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

      public static AsyncFileLock newInstance(AsyncFileLock arg)