Package org.apache.bookkeeper.client
Class BookieInfoReader
- java.lang.Object
-
- org.apache.bookkeeper.client.BookieInfoReader
-
public class BookieInfoReader extends java.lang.Object
A utility class to readBookieInfoReader.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.
-
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) void
availableBookiesChanged(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) void
getReadWriteBookieInfo()
Performs scan described by instanceState using the cached bookie information in bookieInfoMap.(package private) void
onExit()
void
start()
-
-
-
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:
BKException
java.lang.InterruptedException
-
-