Package org.apache.bookkeeper.meta
Class NullMetadataBookieDriver.NullLedgerIdGenerator
- java.lang.Object
-
- org.apache.bookkeeper.meta.NullMetadataBookieDriver.NullLedgerIdGenerator
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,LedgerIdGenerator
- Enclosing class:
- NullMetadataBookieDriver
public static class NullMetadataBookieDriver.NullLedgerIdGenerator extends java.lang.Object implements LedgerIdGenerator
A no-op implementation of LedgerIdGenerator.
-
-
Constructor Summary
Constructors Constructor Description NullLedgerIdGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
generateLedgerId(BookkeeperInternalCallbacks.GenericCallback<java.lang.Long> cb)
Generate a global unique ledger id.
-
-
-
Method Detail
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
generateLedgerId
public void generateLedgerId(BookkeeperInternalCallbacks.GenericCallback<java.lang.Long> cb)
Description copied from interface:LedgerIdGenerator
Generate a global unique ledger id.- Specified by:
generateLedgerId
in interfaceLedgerIdGenerator
- 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
-
-