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.AutoCloseable
Interface to handle the ledger auditor election.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LedgerAuditorManager.AuditorEvent
Events that can be triggered by the LedgerAuditorManager.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BookieId
getCurrentAuditor()
Return the information regarding the current auditor.void
tryToBecomeAuditor(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.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:
java.io.IOException
java.lang.InterruptedException
-
getCurrentAuditor
BookieId getCurrentAuditor() throws java.io.IOException, java.lang.InterruptedException
Return the information regarding the current auditor.- Returns:
- Throws:
java.io.IOException
java.lang.InterruptedException
-
-