Package org.apache.bookkeeper.meta
Interface LedgerAuditorManager
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
NullMetadataBookieDriver.NullLedgerAuditorManager,ZkLedgerAuditorManager
public interface LedgerAuditorManager extends java.lang.AutoCloseableInterface to handle the ledger auditor election.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classLedgerAuditorManager.AuditorEventEvents that can be triggered by the LedgerAuditorManager.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BookieIdgetCurrentAuditor()Return the information regarding the current auditor.voidtryToBecomeAuditor(java.lang.String bookieId, java.util.function.Consumer<LedgerAuditorManager.AuditorEvent> listener)Try to become the auditor.
-
-
-
Method Detail
-
tryToBecomeAuditor
void tryToBecomeAuditor(java.lang.String bookieId, java.util.function.Consumer<LedgerAuditorManager.AuditorEvent> listener) throws java.io.IOException, java.lang.InterruptedExceptionTry 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:
java.io.IOExceptionjava.lang.InterruptedException
-
getCurrentAuditor
BookieId getCurrentAuditor() throws java.io.IOException, java.lang.InterruptedException
Return the information regarding the current auditor.- Returns:
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
-