Package org.apache.bookkeeper.client
Class BookieInfoReader
- java.lang.Object
-
- org.apache.bookkeeper.client.BookieInfoReader
-
public class BookieInfoReader extends java.lang.ObjectA utility class to readBookieInfoReader.BookieInfofrom 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 classBookieInfoReader.BookieInfoA class represents the information (e.g.static classBookieInfoReader.StateTracks whether there is an execution in progress as well as whether another is pending.
-
Constructor Summary
Constructors Constructor Description BookieInfoReader(BookKeeper bk, ClientConfiguration conf, java.util.concurrent.ScheduledExecutorService scheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidavailableBookiesChanged(java.util.Set<BookieId> updatedBookiesList)(package private) java.util.Map<BookieId,BookieInfoReader.BookieInfo>getBookieInfo()(package private) java.util.Optional<java.lang.Long>getFreeDiskSpace(BookieId bookie)Method to allow tests to block until bookie info is available.(package private) voidgetReadWriteBookieInfo()Performs scan described by instanceState using the cached bookie information in bookieInfoMap.(package private) voidonExit()voidstart()
-
-
-
Constructor Detail
-
BookieInfoReader
BookieInfoReader(BookKeeper bk, ClientConfiguration conf, java.util.concurrent.ScheduledExecutorService scheduler)
-
-
Method Detail
-
start
public void start()
-
availableBookiesChanged
void availableBookiesChanged(java.util.Set<BookieId> updatedBookiesList)
-
getFreeDiskSpace
java.util.Optional<java.lang.Long> getFreeDiskSpace(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()
-
getBookieInfo
java.util.Map<BookieId,BookieInfoReader.BookieInfo> getBookieInfo() throws BKException, java.lang.InterruptedException
- Throws:
BKExceptionjava.lang.InterruptedException
-
-