Package org.apache.bookkeeper.meta
Class NullMetadataBookieDriver.NullLedgerAuditorManager
- java.lang.Object
-
- org.apache.bookkeeper.meta.NullMetadataBookieDriver.NullLedgerAuditorManager
-
- All Implemented Interfaces:
java.lang.AutoCloseable,LedgerAuditorManager
- Enclosing class:
- NullMetadataBookieDriver
public static class NullMetadataBookieDriver.NullLedgerAuditorManager extends java.lang.Object implements LedgerAuditorManager
A no-op implementation of LedgerAuditorManager.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.bookkeeper.meta.LedgerAuditorManager
LedgerAuditorManager.AuditorEvent
-
-
Constructor Summary
Constructors Constructor Description NullLedgerAuditorManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()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
public void tryToBecomeAuditor(java.lang.String bookieId, java.util.function.Consumer<LedgerAuditorManager.AuditorEvent> listener) throws java.io.IOException, java.lang.InterruptedExceptionDescription copied from interface:LedgerAuditorManagerTry to become the auditor. If there's already another auditor, it will wait until this current instance has become the auditor.- Specified by:
tryToBecomeAuditorin interfaceLedgerAuditorManager- Parameters:
bookieId- the identifier for current bookielistener- listener that will receive AuditorEvent notifications- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
getCurrentAuditor
public BookieId getCurrentAuditor() throws java.io.IOException, java.lang.InterruptedException
Description copied from interface:LedgerAuditorManagerReturn the information regarding the current auditor.- Specified by:
getCurrentAuditorin interfaceLedgerAuditorManager- Returns:
- Throws:
java.io.IOExceptionjava.lang.InterruptedException
-
close
public void close() throws java.lang.Exception- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
-