io.vertx.rxjava3.core.file

## Class AsyncFileLock

- java.lang.Object
- - io.vertx.rxjava3.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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<AsyncFileLock>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsyncFileLock(AsyncFileLock delegate)`
    `AsyncFileLock(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `AsyncFileLock` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `isShared()`
    `Single<Boolean>` | `isValid()` Like `isValid()` but the `handler` will be called when the operation completes or if an error occurs.
    `boolean` | `isValidBlocking()` Like `isValid()` but blocking.
    `static AsyncFileLock` | `newInstance(AsyncFileLock arg)`
    `boolean` | `overlaps(long position, long size)`
    `long` | `position()`
    `Completable` | `release()` Like `release()` but the `handler` will be called when the operation completes or if an error occurs.
    `void` | `releaseBlocking()` Like `release()` but blocking.
    `Single<Boolean>` | `rxIsValid()` Like `isValid()` but the `handler` will be called when the operation completes or if an error occurs.
    `Completable` | `rxRelease()` Like `release()` but the `handler` will be called when the operation completes or if an error occurs.
    `long` | `size()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 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

    - #### 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 Single<Boolean> isValid()

      Like `isValid()` but the `handler` will be called when the operation completes or if an error occurs.
      Returns:

    - #### rxIsValid

          public Single<Boolean> rxIsValid()

      Like `isValid()` but the `handler` will be called when the operation completes or if an error occurs.
      Returns:

    - #### releaseBlocking

          public void releaseBlocking()

      Like `release()` but blocking.

    - #### release

          public Completable release()

      Like `release()` but the `handler` will be called when the operation completes or if an error occurs.
      Returns:

    - #### rxRelease

          public Completable rxRelease()

      Like `release()` but the `handler` will be called when the operation completes or if an error occurs.
      Returns:

    - #### newInstance

          public static AsyncFileLock newInstance(AsyncFileLock arg)

Copyright © 2025 Eclipse. All rights reserved.