Package org.apache.bookkeeper.meta
Interface LedgerIdGenerator
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
- All Known Implementing Classes:
LongZkLedgerIdGenerator,NullMetadataBookieDriver.NullLedgerIdGenerator,ZkLedgerIdGenerator
public interface LedgerIdGenerator extends java.io.CloseableThe interface for global unique ledger ID generation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidgenerateLedgerId(BookkeeperInternalCallbacks.GenericCallback<java.lang.Long> cb)Generate a global unique ledger id.
-
-
-
Method Detail
-
generateLedgerId
void generateLedgerId(BookkeeperInternalCallbacks.GenericCallback<java.lang.Long> cb)
Generate a global unique ledger id.- Parameters:
cb- Callback when a new ledger id is generated, return code:BKException.Code.OKif successBKException.Code.ZKExceptionwhen can't generate new ledger id
-
-