Package org.apache.bookkeeper.meta
Interface LedgerAuditorManager
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
NullMetadataBookieDriver.NullLedgerAuditorManager,ZkLedgerAuditorManager
Interface to handle the ledger auditor election.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEvents that can be triggered by the LedgerAuditorManager. -
Method Summary
Modifier and TypeMethodDescriptionReturn the information regarding the current auditor.voidtryToBecomeAuditor(String bookieId, Consumer<LedgerAuditorManager.AuditorEvent> listener) Try to become the auditor.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
tryToBecomeAuditor
void tryToBecomeAuditor(String bookieId, Consumer<LedgerAuditorManager.AuditorEvent> listener) throws IOException, InterruptedException Try to become the auditor. If there's already another auditor, it will wait until this current instance has become the auditor.- Parameters:
bookieId- the identifier for current bookielistener- listener that will receive AuditorEvent notifications- Throws:
IOExceptionInterruptedException
-
getCurrentAuditor
Return the information regarding the current auditor.- Returns:
- Throws:
IOExceptionInterruptedException
-