Package org.apache.bookkeeper.meta
Interface LedgerManager.LedgerRangeIterator
-
- All Known Implementing Classes:
MSLedgerManagerFactory.MsLedgerManager.MSLedgerRangeIterator
- Enclosing interface:
- LedgerManager
public static interface LedgerManager.LedgerRangeIterator
Interface of the ledger meta range iterator from storage (e.g. in ZooKeeper or other key/value store).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasNext()
LedgerManager.LedgerRange
next()
Get the next element.
-
-
-
Method Detail
-
hasNext
boolean hasNext() throws java.io.IOException
- 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
LedgerManager.LedgerRange next() throws java.io.IOException
Get the next element.- 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.
-
-