@InterfaceAudience.Public
@InterfaceStability.Unstable
public interface Handle
extends java.lang.AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Close this handle synchronously.
|
java.util.concurrent.CompletableFuture<java.lang.Void> |
closeAsync()
Asynchronous close the handle.
|
long |
getId()
Get the id of the current ledger.
|
LedgerMetadata |
getLedgerMetadata()
Returns the metadata of this ledger.
|
long getId()
default void close()
throws BKException,
java.lang.InterruptedException
close in interface java.lang.AutoCloseableBKExceptionjava.lang.InterruptedExceptioncloseAsync()java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
LedgerMetadata getLedgerMetadata()
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.
Copyright © 2011–2024 The Apache Software Foundation. All rights reserved.