Package io.vertx.reactivex.core.file

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

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

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AsyncFileLock​(AsyncFileLock delegate)` |
    `AsyncFileLock​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `boolean` | `equals​(Object o)` |
    `AsyncFileLock` | `getDelegate()` |
    `int` | `hashCode()` |
    `boolean` | `isShared()` |
    `Future<Boolean>` | `isValid()` | A lock remains valid until it is released or the file corresponding `AsyncFile` is closed.
    `boolean` | `isValidBlocking()` | Like `isValid()` but blocking.
    `static AsyncFileLock` | `newInstance​(AsyncFileLock arg)` |
    `boolean` | `overlaps​(long position, long size)` |
    `long` | `position()` |
    `Future<Void>` | `release()` | Releases this lock;
    `void` | `releaseBlocking()` | Like `release()` but blocking.
    `Single<Boolean>` | `rxIsValid()` | A lock remains valid until it is released or the file corresponding `AsyncFile` is closed.
    `Completable` | `rxRelease()` | Releases this lock;
    `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 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)