Class NullMetadataBookieDriver.NullRegistrationManager

    • Constructor Detail

      • NullRegistrationManager

        public NullRegistrationManager()
    • Method Detail

      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface RegistrationManager
      • registerBookie

        public void registerBookie​(BookieId bookieId,
                                   boolean readOnly,
                                   BookieServiceInfo bookieService)
        Description copied from interface: RegistrationManager
        Registering the bookie server as bookieId.
        Specified by:
        registerBookie in interface RegistrationManager
        Parameters:
        bookieId - bookie id
        readOnly - whether to register it as writable or readonly
        bookieService - information about services exposed by the Bookie
      • unregisterBookie

        public void unregisterBookie​(BookieId bookieId,
                                     boolean readOnly)
        Description copied from interface: RegistrationManager
        Unregistering the bookie server as bookieId.
        Specified by:
        unregisterBookie in interface RegistrationManager
        Parameters:
        bookieId - bookie id
        readOnly - whether to register it as writable or readonly
      • isBookieRegistered

        public boolean isBookieRegistered​(BookieId bookieId)
        Description copied from interface: RegistrationManager
        Checks if Bookie with the given BookieId is registered as readwrite or readonly bookie.
        Specified by:
        isBookieRegistered in interface RegistrationManager
        Parameters:
        bookieId - bookie id
        Returns:
        returns true if a bookie with bookieid is currently registered as readwrite or readonly bookie.
      • prepareFormat

        public boolean prepareFormat()
        Description copied from interface: RegistrationManager
        Prepare ledgers root node, availableNode, readonly node..
        Specified by:
        prepareFormat in interface RegistrationManager
        Returns:
        Returns true if old data exists, false if not.
      • initNewCluster

        public boolean initNewCluster()
        Description copied from interface: RegistrationManager
        Initializes new cluster by creating required znodes for the cluster. If ledgersrootpath is already existing then it will error out.
        Specified by:
        initNewCluster in interface RegistrationManager
        Returns:
        returns true if new cluster is successfully created or false if it failed to initialize.
      • format

        public boolean format()
        Description copied from interface: RegistrationManager
        Do format boolean.
        Specified by:
        format in interface RegistrationManager
        Returns:
        Returns true if success do format, false if not.
      • nukeExistingCluster

        public boolean nukeExistingCluster()
        Description copied from interface: RegistrationManager
        Nukes existing cluster metadata.
        Specified by:
        nukeExistingCluster in interface RegistrationManager
        Returns:
        returns true if cluster metadata is successfully nuked or false if it failed to nuke the cluster metadata.