Package org.apache.bookkeeper.client.api
Interface ListLedgersResult
-
- All Superinterfaces:
java.lang.AutoCloseable
public interface ListLedgersResult extends java.lang.AutoCloseable
Utility container for listing ledgers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LedgersIterator
iterator()
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 perListLedgersResult
instance.- Returns:
- a
LedgersIterator
instance.
-
toIterable
java.lang.Iterable<java.lang.Long> toIterable()
Creates aIterable
, which wraps aLedgersIterator
. This method must be called once perListLedgersResult
instance.
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
Iterable
instance, containing ledger ids.
-
-