Class PulsarRegistrationManager

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.apache.bookkeeper.discover.RegistrationManager

    public class PulsarRegistrationManager
    extends java.lang.Object
    implements org.apache.bookkeeper.discover.RegistrationManager
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.apache.bookkeeper.discover.RegistrationManager

        org.apache.bookkeeper.discover.RegistrationManager.RegistrationListener
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      boolean format()  
      java.lang.String getClusterInstanceId()  
      boolean initNewCluster()  
      boolean isBookieRegistered​(org.apache.bookkeeper.net.BookieId bookieId)  
      boolean nukeExistingCluster()  
      boolean prepareFormat()  
      org.apache.bookkeeper.versioning.Versioned<byte[]> readCookie​(org.apache.bookkeeper.net.BookieId bookieId)  
      void registerBookie​(org.apache.bookkeeper.net.BookieId bookieId, boolean readOnly, org.apache.bookkeeper.discover.BookieServiceInfo bookieServiceInfo)  
      void removeCookie​(org.apache.bookkeeper.net.BookieId bookieId, org.apache.bookkeeper.versioning.Version version)  
      void unregisterBookie​(org.apache.bookkeeper.net.BookieId bookieId, boolean readOnly)  
      void writeCookie​(org.apache.bookkeeper.net.BookieId bookieId, org.apache.bookkeeper.versioning.Versioned<byte[]> cookieData)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface org.apache.bookkeeper.discover.RegistrationManager
      • getClusterInstanceId

        public java.lang.String getClusterInstanceId()
                                              throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        getClusterInstanceId in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • registerBookie

        public void registerBookie​(org.apache.bookkeeper.net.BookieId bookieId,
                                   boolean readOnly,
                                   org.apache.bookkeeper.discover.BookieServiceInfo bookieServiceInfo)
                            throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        registerBookie in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • unregisterBookie

        public void unregisterBookie​(org.apache.bookkeeper.net.BookieId bookieId,
                                     boolean readOnly)
                              throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        unregisterBookie in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • isBookieRegistered

        public boolean isBookieRegistered​(org.apache.bookkeeper.net.BookieId bookieId)
                                   throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        isBookieRegistered in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • writeCookie

        public void writeCookie​(org.apache.bookkeeper.net.BookieId bookieId,
                                org.apache.bookkeeper.versioning.Versioned<byte[]> cookieData)
                         throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        writeCookie in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • readCookie

        public org.apache.bookkeeper.versioning.Versioned<byte[]> readCookie​(org.apache.bookkeeper.net.BookieId bookieId)
                                                                      throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        readCookie in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • removeCookie

        public void removeCookie​(org.apache.bookkeeper.net.BookieId bookieId,
                                 org.apache.bookkeeper.versioning.Version version)
                          throws org.apache.bookkeeper.bookie.BookieException
        Specified by:
        removeCookie in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        org.apache.bookkeeper.bookie.BookieException
      • prepareFormat

        public boolean prepareFormat()
                              throws java.lang.Exception
        Specified by:
        prepareFormat in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        java.lang.Exception
      • initNewCluster

        public boolean initNewCluster()
                               throws java.lang.Exception
        Specified by:
        initNewCluster in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        java.lang.Exception
      • format

        public boolean format()
                       throws java.lang.Exception
        Specified by:
        format in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        java.lang.Exception
      • nukeExistingCluster

        public boolean nukeExistingCluster()
                                    throws java.lang.Exception
        Specified by:
        nukeExistingCluster in interface org.apache.bookkeeper.discover.RegistrationManager
        Throws:
        java.lang.Exception