Class BookieInfoReader


  • public class BookieInfoReader
    extends java.lang.Object
    A utility class to read BookieInfoReader.BookieInfo from bookies.

    NOTE: This class is tended to be used by this project only. External users should not rely on it directly.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BookieInfoReader.BookieInfo
      A class represents the information (e.g.
      static class  BookieInfoReader.State
      Tracks whether there is an execution in progress as well as whether another is pending.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void availableBookiesChanged​(java.util.Set<org.apache.bookkeeper.net.BookieId> updatedBookiesList)  
      (package private) java.util.Map<org.apache.bookkeeper.net.BookieId,​BookieInfoReader.BookieInfo> getBookieInfo()  
      (package private) java.util.Optional<java.lang.Long> getFreeDiskSpace​(org.apache.bookkeeper.net.BookieId bookie)
      Method to allow tests to block until bookie info is available.
      (package private) void getReadWriteBookieInfo()
      Performs scan described by instanceState using the cached bookie information in bookieInfoMap.
      (package private) void onExit()  
      void start()  
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • start

        public void start()
      • availableBookiesChanged

        void availableBookiesChanged​(java.util.Set<org.apache.bookkeeper.net.BookieId> updatedBookiesList)
      • getFreeDiskSpace

        java.util.Optional<java.lang.Long> getFreeDiskSpace​(org.apache.bookkeeper.net.BookieId bookie)
        Method to allow tests to block until bookie info is available.
        Parameters:
        bookie - to lookup
        Returns:
        None if absent, free disk space if present
      • getReadWriteBookieInfo

        void getReadWriteBookieInfo()
        Performs scan described by instanceState using the cached bookie information in bookieInfoMap.
      • onExit

        void onExit()