Package org.apache.bookkeeper.client.api
Interface ListLedgersResult
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface ListLedgersResult extends java.lang.AutoCloseableUtility container for listing ledgers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LedgersIteratoriterator()Creates aLedgersIterator.java.lang.Iterable<java.lang.Long>toIterable()Creates aIterable, which wraps aLedgersIterator.
-
-
-
Method Detail
-
iterator
LedgersIterator iterator()
Creates aLedgersIterator. This method must be called once perListLedgersResultinstance.- Returns:
- a
LedgersIteratorinstance.
-
toIterable
java.lang.Iterable<java.lang.Long> toIterable()
Creates aIterable, which wraps aLedgersIterator. This method must be called once perListLedgersResultinstance.
Metadata store access exceptions (IOException) are wrapped within a RuntimeException. if you want to take care of these cases, it is better to useLedgersIterator.- Returns:
- a
Iterableinstance, containing ledger ids.
-
-