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 java.lang.Object implements LedgerManager.LedgerRangeIterator
-
-
Field Summary
Fields Modifier and Type Field Description (package private) MetastoreCursor
cursor
(package private) java.util.concurrent.CountDownLatch
openCursorLatch
-
Constructor Summary
Constructors Constructor Description MSLedgerRangeIterator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
LedgerManager.LedgerRange
next()
Get the next element.
-
-
-
Field Detail
-
openCursorLatch
final java.util.concurrent.CountDownLatch openCursorLatch
-
cursor
MetastoreCursor cursor
-
-
Method Detail
-
hasNext
public boolean hasNext() throws java.io.IOException
- Specified by:
hasNext
in 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:
java.io.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
public LedgerManager.LedgerRange next() throws java.io.IOException
Description copied from interface:LedgerManager.LedgerRangeIterator
Get the next element.- Specified by:
next
in interfaceLedgerManager.LedgerRangeIterator
- Returns:
- the next element, the LedgerRange returned must be non-empty
- Throws:
java.io.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.
-
-