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.Closeable
The interface for global unique ledger ID generation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
generateLedgerId(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.OK
if successBKException.Code.ZKException
when can't generate new ledger id
-
-