Interface Handle

    • Method Detail

      • getId

        long getId()
        Get the id of the current ledger.
        Returns:
        the id of the ledger
      • close

        default void close()
                    throws BKException,
                           java.lang.InterruptedException
        Close this handle synchronously.
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        BKException
        java.lang.InterruptedException
        See Also:
        closeAsync()
      • closeAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
        Asynchronous close the handle.
        Returns:
        an handle to access the result of the operation
      • getLedgerMetadata

        LedgerMetadata getLedgerMetadata()
        Returns the metadata of this ledger.

        This call only retrieves the metadata cached locally. If there is any metadata updated, the read handle will receive the metadata updates and update the metadata locally. The metadata notification can be deplayed, so it is possible you can receive a stale copy of ledger metadata from this call.

        Returns:
        the metadata of this ledger.