Class ZkLedgerAuditorManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable, LedgerAuditorManager

    public class ZkLedgerAuditorManager
    extends java.lang.Object
    implements LedgerAuditorManager
    ZK based implementation of LedgerAuditorManager.
    • Constructor Detail

    • Method Detail

      • tryToBecomeAuditor

        public void tryToBecomeAuditor​(java.lang.String bookieId,
                                       java.util.function.Consumer<LedgerAuditorManager.AuditorEvent> listener)
                                throws java.io.IOException,
                                       java.lang.InterruptedException
        Description copied from interface: LedgerAuditorManager
        Try to become the auditor. If there's already another auditor, it will wait until this current instance has become the auditor.
        Specified by:
        tryToBecomeAuditor in interface LedgerAuditorManager
        Parameters:
        bookieId - the identifier for current bookie
        listener - listener that will receive AuditorEvent notifications
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • getCurrentAuditor

        public BookieId getCurrentAuditor()
                                   throws java.io.IOException,
                                          java.lang.InterruptedException
        Description copied from interface: LedgerAuditorManager
        Return the information regarding the current auditor.
        Specified by:
        getCurrentAuditor in interface LedgerAuditorManager
        Returns:
        Throws:
        java.io.IOException
        java.lang.InterruptedException
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception