Package org.apache.bookkeeper.meta
Class MSLedgerManagerFactory.MsLedgerManager.MSLedgerRangeIterator
java.lang.Object
org.apache.bookkeeper.meta.MSLedgerManagerFactory.MsLedgerManager.MSLedgerRangeIterator
- All Implemented Interfaces:
LedgerManager.LedgerRangeIterator
- Enclosing class:
- MSLedgerManagerFactory.MsLedgerManager
class MSLedgerManagerFactory.MsLedgerManager.MSLedgerRangeIterator
extends Object
implements LedgerManager.LedgerRangeIterator
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) MetastoreCursor(package private) final CountDownLatch -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
openCursorLatch
-
cursor
MetastoreCursor cursor
-
-
Constructor Details
-
MSLedgerRangeIterator
MSLedgerRangeIterator()
-
-
Method Details
-
hasNext
- Specified by:
hasNextin interfaceLedgerManager.LedgerRangeIterator- Returns:
- true if there are records in the ledger metadata store. false only when there are indeed no records in ledger metadata store.
- Throws:
IOException- thrown when there is any problem accessing the ledger metadata store. It is critical that it doesn't return false in the case in the case it fails to access the ledger metadata store. Otherwise it will end up deleting all ledgers by accident.
-
next
Description copied from interface:LedgerManager.LedgerRangeIteratorGet the next element.- Specified by:
nextin interfaceLedgerManager.LedgerRangeIterator- Returns:
- the next element, the LedgerRange returned must be non-empty
- Throws:
IOException- thrown when there is a problem accessing the ledger metadata store. It is critical that it doesn't return false in the case in the case it fails to access the ledger metadata store. Otherwise it will end up deleting all ledgers by accident.
-