@InterfaceAudience.LimitedPrivate
@InterfaceStability.Stable
public interface ManagedLedgerFactory
| Modifier and Type | Method and Description |
|---|---|
void |
asyncDelete(String name,
AsyncCallbacks.DeleteLedgerCallback callback,
Object ctx)
Delete a managed ledger.
|
void |
asyncGetManagedLedgerInfo(String name,
AsyncCallbacks.ManagedLedgerInfoCallback callback,
Object ctx)
Asynchronously get the current metadata info for a managed ledger.
|
void |
asyncOpen(String name,
AsyncCallbacks.OpenLedgerCallback callback,
Object ctx)
Asynchronous open method.
|
void |
asyncOpen(String name,
ManagedLedgerConfig config,
AsyncCallbacks.OpenLedgerCallback callback,
Supplier<Boolean> mlOwnershipChecker,
Object ctx)
Asynchronous open method.
|
void |
asyncOpenReadOnlyCursor(String managedLedgerName,
Position startPosition,
ManagedLedgerConfig config,
AsyncCallbacks.OpenReadOnlyCursorCallback callback,
Object ctx)
Open a
ReadOnlyCursor positioned to the earliest entry for the specified managed ledger |
void |
delete(String name)
Delete a managed ledger.
|
ManagedLedgerInfo |
getManagedLedgerInfo(String name)
Get the current metadata info for a managed ledger.
|
ManagedLedger |
open(String name)
Open a managed ledger.
|
ManagedLedger |
open(String name,
ManagedLedgerConfig config)
Open a managed ledger.
|
ReadOnlyCursor |
openReadOnlyCursor(String managedLedgerName,
Position startPosition,
ManagedLedgerConfig config)
Open a
ReadOnlyCursor positioned to the earliest entry for the specified managed ledger |
void |
shutdown()
Releases all the resources maintained by the ManagedLedgerFactory.
|
ManagedLedger open(String name) throws InterruptedException, ManagedLedgerException
name - the unique name that identifies the managed ledgerManagedLedgerExceptionInterruptedExceptionManagedLedger open(String name, ManagedLedgerConfig config) throws InterruptedException, ManagedLedgerException
name - the unique name that identifies the managed ledgerconfig - managed ledger configurationManagedLedgerExceptionInterruptedExceptionvoid asyncOpen(String name, AsyncCallbacks.OpenLedgerCallback callback, Object ctx)
name - the unique name that identifies the managed ledgercallback - callback objectctx - opaque contextopen(String)void asyncOpen(String name, ManagedLedgerConfig config, AsyncCallbacks.OpenLedgerCallback callback, Supplier<Boolean> mlOwnershipChecker, Object ctx)
name - the unique name that identifies the managed ledgerconfig - managed ledger configurationcallback - callback objectmlOwnershipChecker - checks ml-ownership in case updating ml-metadata fails due to ownership conflictctx - opaque contextopen(String, ManagedLedgerConfig)ReadOnlyCursor openReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config) throws InterruptedException, ManagedLedgerException
ReadOnlyCursor positioned to the earliest entry for the specified managed ledgermanagedLedgerName - startPosition - set the cursor on that particular position. If setting to `PositionImpl.earliest` it will be
positioned on the first available entry.InterruptedExceptionManagedLedgerExceptionvoid asyncOpenReadOnlyCursor(String managedLedgerName, Position startPosition, ManagedLedgerConfig config, AsyncCallbacks.OpenReadOnlyCursorCallback callback, Object ctx)
ReadOnlyCursor positioned to the earliest entry for the specified managed ledgermanagedLedgerName - startPosition - set the cursor on that particular position. If setting to `PositionImpl.earliest` it will be
positioned on the first available entry.callback - ctx - ManagedLedgerInfo getManagedLedgerInfo(String name) throws InterruptedException, ManagedLedgerException
name - the unique name that identifies the managed ledgerInterruptedExceptionManagedLedgerExceptionvoid asyncGetManagedLedgerInfo(String name, AsyncCallbacks.ManagedLedgerInfoCallback callback, Object ctx)
name - the unique name that identifies the managed ledgercallback - callback objectctx - opaque contextvoid delete(String name) throws InterruptedException, ManagedLedgerException
name - InterruptedExceptionManagedLedgerExceptionvoid asyncDelete(String name, AsyncCallbacks.DeleteLedgerCallback callback, Object ctx)
name - InterruptedExceptionManagedLedgerExceptionvoid shutdown()
throws InterruptedException,
ManagedLedgerException
Copyright © 2017–2021 Apache Software Foundation. All rights reserved.